7.1.6.7. Runnable

class BookBrowser.QtApplication.Runnable.Worker(callback, *args, **kwargs)[source]

Bases: PyQt5.QtCore.QRunnable

Class to implement a worker thread.

Note

non-GIL-releasing Python code can only execute in one thread at a time.

Parameters:
  • callback (function) – The function callback to run on this worker thread. Supplied args and kwargs will be passed through to the runner.
  • args – Arguments to pass to the callback function
  • kwargs – Keywords to pass to the callback function
__init__(callback, *args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

_logger = <Logger BookBrowser.QtApplication.Runnable.Worker (WARNING)>
run(self)[source]
signals
class BookBrowser.QtApplication.Runnable.WorkerSignals[source]

Bases: PyQt5.QtCore.QObject

Class to define the signals available from a running worker thread.

Note

signals can only be defined on objects derived from QObject.

Supported signals are:

finished
No data
error
tuple (exctype, value, traceback.format_exc() )
result
object data returned from processing, anything
progress
int
error
finished
progress
result