Package qubx :: Module task :: Class Robot_Hold
[hide private]
[frames] | no frames]

Class Robot_Hold

source code

object --+
         |
        Robot_Hold

Context manager, for use in a Task thread, which pauses a Robot (or Robots) thread while it is entered.

>>> with robot.hold_from_task(task):
...     read_something_volatile()

Used in combination with throw_in, the exception is sometimes at inconveniently times in __enter__, __call__, or __exit__. This is a possible source of freeze-ups.

In Linux, the Task thread can work with the GUI while the main thread is paused, but this technique is not compatible with the Windows thread model. Not sure about Mac OS X.

Instance Methods [hide private]
 
__init__(self, robot, task)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__enter__(self) source code
 
__call__(self) source code
 
__exit__(self, type, value, tback) source code

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

Properties [hide private]
  task
  robot

Inherited from object: __class__

Method Details [hide private]

__init__(self, robot, task)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

Property Details [hide private]

task

Get Method:
unreachable(self)

robot

Get Method:
unreachable(self)