The implementation of multiprocess.Queue

Note:
1) When calling _buffer.popleft(), it doesn't hold any lock in QueueFeederThread.
2) It uses semaphore/pipe for mulitiprocess resource management.
3) Reader and Writer are holding different lock while accessing the pipe
4) QueueFeederThread is responsible for moving the objects in _buffer (deque) to the underlying pipe.
The implementation of multiprocess.Queue_第1张图片


你可能感兴趣的:(The implementation of multiprocess.Queue)