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

Class GTK_Main_Hold

source code

object --+
         |
        GTK_Main_Hold

Context manager, for use in a Task thread, which pauses the main thread while it is entered.

>>> with task.main_hold:
...     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, 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

Inherited from object: __class__

Method Details [hide private]

__init__(self, 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)