Back to index

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

List of all members.

Public Member Functions

def __iter__
def next

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Private Member Functions

def _set

Private Attributes

 _index

Detailed Description

Definition at line 691 of file pool.py.


Member Function Documentation

def multiprocessing.pool.IMapIterator.__iter__ (   self) [inherited]

Definition at line 630 of file pool.py.

00630 
00631     def __iter__(self):
00632         return self

def multiprocessing.pool.IMapUnorderedIterator._set (   self,
  i,
  obj 
) [private]

Reimplemented from multiprocessing.pool.IMapIterator.

Definition at line 693 of file pool.py.

00693 
00694     def _set(self, i, obj):
00695         self._cond.acquire()
00696         try:
00697             self._items.append(obj)
00698             self._index += 1
00699             self._cond.notify()
00700             if self._index == self._length:
00701                 del self._cache[self._job]
00702         finally:
00703             self._cond.release()
00704 
00705 #
00706 #
00707 #

Here is the caller graph for this function:

def multiprocessing.pool.IMapIterator.next (   self,
  timeout = None 
) [inherited]

Definition at line 633 of file pool.py.

00633 
00634     def next(self, timeout=None):
00635         self._cond.acquire()
00636         try:
00637             try:
00638                 item = self._items.popleft()
00639             except IndexError:
00640                 if self._index == self._length:
00641                     raise StopIteration
00642                 self._cond.wait(timeout)
00643                 try:
00644                     item = self._items.popleft()
00645                 except IndexError:
00646                     if self._index == self._length:
00647                         raise StopIteration
00648                     raise TimeoutError
00649         finally:
00650             self._cond.release()
00651 
00652         success, value = item
00653         if success:
00654             return value
00655         raise value

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from multiprocessing.pool.IMapIterator.

Definition at line 699 of file pool.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


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