Back to index

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

List of all members.

Public Member Functions

def __init__
def __repr__
def get_value
def __enter__
def __exit__
def __getstate__
def __setstate__

Public Attributes

 acquire
 release
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Definition at line 127 of file synchronize.py.


Constructor & Destructor Documentation

Reimplemented from multiprocessing.synchronize.Semaphore.

Definition at line 129 of file synchronize.py.

00129 
00130     def __init__(self, value=1):
00131         SemLock.__init__(self, SEMAPHORE, value, value)

Here is the caller graph for this function:


Member Function Documentation

Definition at line 88 of file synchronize.py.

00088 
00089     def __enter__(self):
00090         return self._semlock.__enter__()

def multiprocessing.synchronize.SemLock.__exit__ (   self,
  args 
) [inherited]

Definition at line 91 of file synchronize.py.

00091 
00092     def __exit__(self, *args):
00093         return self._semlock.__exit__(*args)

Here is the caller graph for this function:

Definition at line 94 of file synchronize.py.

00094 
00095     def __getstate__(self):
00096         assert_spawning(self)
00097         sl = self._semlock
00098         return (Popen.duplicate_for_child(sl.handle), sl.kind, sl.maxvalue)

Here is the call graph for this function:

Reimplemented from multiprocessing.synchronize.Semaphore.

Definition at line 132 of file synchronize.py.

00132 
00133     def __repr__(self):
00134         try:
00135             value = self._semlock._get_value()
00136         except Exception:
00137             value = 'unknown'
00138         return '<BoundedSemaphore(value=%s, maxvalue=%s)>' % \
00139                (value, self._semlock.maxvalue)
00140 
00141 #
00142 # Non-recursive lock
00143 #

def multiprocessing.synchronize.SemLock.__setstate__ (   self,
  state 
) [inherited]

Definition at line 99 of file synchronize.py.

00099 
00100     def __setstate__(self, state):
00101         self._semlock = _multiprocessing.SemLock._rebuild(*state)
00102         debug('recreated blocker with handle %r' % state[0])
00103         self._make_methods()
00104 
00105 #
00106 # Semaphore
00107 #

Here is the call graph for this function:

Definition at line 113 of file synchronize.py.

00113 
00114     def get_value(self):
00115         return self._semlock._get_value()

Here is the caller graph for this function:


Member Data Documentation

Definition at line 85 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.

Definition at line 86 of file synchronize.py.


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