mirror of
https://github.com/python/cpython.git
synced 2025-10-05 22:51:56 +00:00
Under *spawn* and *forkserver* start methods, SimpleQueue.empty() could raise AttributeError due to not setting _poll in __setstate__.
This commit is contained in:
parent
b769c91c2d
commit
43d4c0329e
3 changed files with 40 additions and 0 deletions
|
@ -337,6 +337,7 @@ class SimpleQueue(object):
|
|||
|
||||
def __setstate__(self, state):
|
||||
(self._reader, self._writer, self._rlock, self._wlock) = state
|
||||
self._poll = self._reader.poll
|
||||
|
||||
def get(self):
|
||||
with self._rlock:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue