Back to index

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

List of all members.

Public Member Functions

def __init__
def is_set
def set
def clear
def wait

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Private Attributes

 _cond
 _flag

Detailed Description

Definition at line 300 of file synchronize.py.


Constructor & Destructor Documentation

Definition at line 302 of file synchronize.py.

00302 
00303     def __init__(self):
00304         self._cond = Condition(Lock())
00305         self._flag = Semaphore(0)

Here is the caller graph for this function:


Member Function Documentation

Definition at line 325 of file synchronize.py.

00325 
00326     def clear(self):
00327         self._cond.acquire()
00328         try:
00329             self._flag.acquire(False)
00330         finally:
00331             self._cond.release()

Definition at line 306 of file synchronize.py.

00306 
00307     def is_set(self):
00308         self._cond.acquire()
00309         try:
00310             if self._flag.acquire(False):
00311                 self._flag.release()
00312                 return True
00313             return False
00314         finally:
00315             self._cond.release()

Definition at line 316 of file synchronize.py.

00316 
00317     def set(self):
00318         self._cond.acquire()
00319         try:
00320             self._flag.acquire(False)
00321             self._flag.release()
00322             self._cond.notify_all()
00323         finally:
00324             self._cond.release()

Here is the caller graph for this function:

def multiprocessing.synchronize.Event.wait (   self,
  timeout = None 
)

Definition at line 332 of file synchronize.py.

00332 
00333     def wait(self, timeout=None):
00334         self._cond.acquire()
00335         try:
00336             if self._flag.acquire(False):
00337                 self._flag.release()
00338             else:
00339                 self._cond.wait(timeout)
00340 
00341             if self._flag.acquire(False):
00342                 self._flag.release()
00343                 return True
00344             return False
00345         finally:
00346             self._cond.release()

Here is the caller graph for this function:


Member Data Documentation

Definition at line 303 of file synchronize.py.

Definition at line 304 of file synchronize.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: