This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asvetlov
Recipients asvetlov
Date 2015-06-08.18:15:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1433787329.63.0.683771277735.issue24411@psf.upfronthosting.co.za>
In-reply-to
Content
Now those methods use lock for querying queue size, like

    def qsize(self):
        with self.mutex:
            return self._qsize()

The lock is not necessary because thread context switch may be done *after* returning from mutex protected code but *before* getting result by calling side.

All three methods (qsize(), empty() and full()) gives *approximated value*, so getting rid of lock doesn't make it less stringent.
History
Date User Action Args
2015-06-08 18:15:29asvetlovsetrecipients: + asvetlov
2015-06-08 18:15:29asvetlovsetmessageid: <1433787329.63.0.683771277735.issue24411@psf.upfronthosting.co.za>
2015-06-08 18:15:29asvetlovlinkissue24411 messages
2015-06-08 18:15:29asvetlovcreate