Part of pida.utils.gthreads View In Hierarchy
Known subclasses: pida.utils.gthreads.GeneratorSubprocessTask
The diference between this task and AsyncTask is that the 'work_callback' returns a generator. For each value the generator yields the loop_callback is called inside Gtk+'s main loop.
A simple example:
def work():
for i in range(10000):
yield i
def loop(val):
print val
gt = GeneratorTask(work, loop)
gt.start()
import gtk
gtk.main()
Split Table into Classes Show Methods in One Table
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 109 | Method | __init__ | Undocumented |
| 113 | Method | _work_callback | Undocumented |
| 122 | Method | stop | Undocumented |
Inherited from AsyncTask:
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 57 | Method | start | Please note that start is not thread safe. It is assumed that this |
| 66 | Method | work_callback | Undocumented |
| 69 | Method | loop_callback | Undocumented |
| 76 | Method | _loop_callback | Undocumented |
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 109 | Method | __init__ | Undocumented |
| 76 | Method | _loop_callback | Undocumented |
| 113 | Method | _work_callback | Undocumented |
| 69 | Method | loop_callback | Undocumented |
| 57 | Method | start | Please note that start is not thread safe. It is assumed that this |
| 122 | Method | stop | Undocumented |
| 66 | Method | work_callback | Undocumented |