Back to index

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

List of all members.

Public Member Functions

def __init__
def __repr__
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 169 of file synchronize.py.


Constructor & Destructor Documentation

Definition at line 171 of file synchronize.py.

00171 
00172     def __init__(self):
00173         SemLock.__init__(self, RECURSIVE_MUTEX, 1, 1)

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:

Definition at line 174 of file synchronize.py.

00174 
00175     def __repr__(self):
00176         try:
00177             if self._semlock._is_mine():
00178                 name = current_process().name
00179                 if threading.current_thread().name != 'MainThread':
00180                     name += '|' + threading.current_thread().name
00181                 count = self._semlock._count()
00182             elif self._semlock._get_value() == 1:
00183                 name, count = 'None', 0
00184             elif self._semlock._count() > 0:
00185                 name, count = 'SomeOtherThread', 'nonzero'
00186             else:
00187                 name, count = 'SomeOtherProcess', 'nonzero'
00188         except Exception:
00189             name, count = 'unknown', 'unknown'
00190         return '<RLock(%s, %s)>' % (name, count)
00191 
00192 #
00193 # Condition variable
00194 #

Here is the call graph for this function:

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:


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: