Package _emerge :: Module AsynchronousLock :: Class AsynchronousLock
[hide private]

Class AsynchronousLock

source code

                        object --+        
                                 |        
portage.util.SlotObject.SlotObject --+    
                                     |    
     AsynchronousTask.AsynchronousTask --+
                                         |
                                        AsynchronousLock

This uses the portage.locks module to acquire a lock asynchronously, using either a thread (if available) or a subprocess.

The default behavior is to use a process instead of a thread, since there is currently no way to interrupt a thread that is waiting for a lock (notably, SIGINT doesn't work because python delivers all signals to the main thread).

Instance Methods [hide private]
 
_start(self) source code
 
_imp_exit(self, imp) source code
 
_cancel(self)
Subclasses should implement this, as a template method to be called by AsynchronousTask.cancel().
source code
 
_poll(self) source code
 
_wait(self) source code
 
unlock(self) source code

Inherited from AsynchronousTask.AsynchronousTask: addExitListener, addStartListener, cancel, isAlive, poll, removeExitListener, removeStartListener, start, wait

Inherited from portage.util.SlotObject.SlotObject: __init__, copy

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  _use_process_by_default = True
Properties [hide private]
  _force_async
  _force_dummy
  _force_process
  _force_thread
  _imp
  path
  scheduler

Inherited from AsynchronousTask.AsynchronousTask: background, cancelled, returncode

Inherited from object: __class__

Method Details [hide private]

_start(self)

source code 
Overrides: AsynchronousTask.AsynchronousTask._start

_cancel(self)

source code 

Subclasses should implement this, as a template method to be called by AsynchronousTask.cancel().

Overrides: AsynchronousTask.AsynchronousTask._cancel
(inherited documentation)

_poll(self)

source code 
Overrides: AsynchronousTask.AsynchronousTask._poll

_wait(self)

source code 
Overrides: AsynchronousTask.AsynchronousTask._wait