Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
multiprocessing.queues.SimpleQueue Class Reference
Inheritance diagram for multiprocessing.queues.SimpleQueue:
Inheritance graph
[legend]
Collaboration diagram for multiprocessing.queues.SimpleQueue:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def empty
def __getstate__
def __setstate__

Public Attributes

 get
 put
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Private Member Functions

def _make_methods

Private Attributes

 _writer
 _rlock
 _wlock

Detailed Description

Definition at line 350 of file queues.py.


Constructor & Destructor Documentation

Definition at line 352 of file queues.py.

00352 
00353     def __init__(self):
00354         self._reader, self._writer = Pipe(duplex=False)
00355         self._rlock = Lock()
00356         if sys.platform == 'win32':
00357             self._wlock = None
00358         else:
00359             self._wlock = Lock()
00360         self._make_methods()

Here is the caller graph for this function:


Member Function Documentation

Definition at line 364 of file queues.py.

00364 
00365     def __getstate__(self):
00366         assert_spawning(self)
00367         return (self._reader, self._writer, self._rlock, self._wlock)

Here is the call graph for this function:

Definition at line 368 of file queues.py.

00368 
00369     def __setstate__(self, state):
00370         (self._reader, self._writer, self._rlock, self._wlock) = state
00371         self._make_methods()

Here is the call graph for this function:

Definition at line 372 of file queues.py.

00372 
00373     def _make_methods(self):
00374         recv = self._reader.recv
00375         racquire, rrelease = self._rlock.acquire, self._rlock.release
00376         def get():
00377             racquire()
00378             try:
00379                 return recv()
00380             finally:
00381                 rrelease()
00382         self.get = get
00383 
00384         if self._wlock is None:
00385             # writes to a message oriented win32 pipe are atomic
00386             self.put = self._writer.send
00387         else:
00388             send = self._writer.send
00389             wacquire, wrelease = self._wlock.acquire, self._wlock.release
00390             def put(obj):
00391                 wacquire()
00392                 try:
00393                     return send(obj)
00394                 finally:
00395                     wrelease()
00396             self.put = put

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 361 of file queues.py.

00361 
00362     def empty(self):
00363         return not self._reader.poll()


Member Data Documentation

Definition at line 354 of file queues.py.

Definition at line 356 of file queues.py.

Definition at line 353 of file queues.py.

Definition at line 381 of file queues.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 385 of file queues.py.


The documentation for this class was generated from the following file: