Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
multiprocessing.synchronize.Lock Class Reference
Inheritance diagram for multiprocessing.synchronize.Lock:
Inheritance graph
[legend]
Collaboration diagram for multiprocessing.synchronize.Lock:
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 144 of file synchronize.py.


Constructor & Destructor Documentation

Definition at line 146 of file synchronize.py.

00146 
00147     def __init__(self):
00148         SemLock.__init__(self, SEMAPHORE, 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 149 of file synchronize.py.

00149 
00150     def __repr__(self):
00151         try:
00152             if self._semlock._is_mine():
00153                 name = current_process().name
00154                 if threading.current_thread().name != 'MainThread':
00155                     name += '|' + threading.current_thread().name
00156             elif self._semlock._get_value() == 1:
00157                 name = 'None'
00158             elif self._semlock._count() > 0:
00159                 name = 'SomeOtherThread'
00160             else:
00161                 name = 'SomeOtherProcess'
00162         except Exception:
00163             name = 'unknown'
00164         return '<Lock(owner=%s)>' % name
00165 
00166 #
00167 # Recursive lock
00168 #

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: