Files
superqt/docs/utilities/threading.md
Talley Lambert 97bb814451 Docs (#124)
* wip

* wip

* more wip

* progress

* more docs

* more changes

* add link

* more examples and improvements

* fix check-manifest

* sort members

* remove autogen images

* remove _images

* add font docs

* add link to utils
2022-10-05 08:59:27 -04:00

1.1 KiB

Thread workers

The objects in this module provide utilities for running tasks in a separate thread. In general (with the exception of new_worker_qthread), everything here wraps Qt's QRunnable API.

The highest level object is the [@thread_worker][superqt.utils.thread_worker] decorator. It was originally written for napari, and was later extracted into superqt. You may also be interested in reading the napari documentation on this feature, which provides a more in-depth/introductory usage guide.

For additional control, you can create your own [FunctionWorker][superqt.utils.FunctionWorker] or [GeneratorWorker][superqt.utils.GeneratorWorker] objects.

::: superqt.utils.WorkerBase

::: superqt.utils.FunctionWorker

::: superqt.utils.GeneratorWorker

Convenience functions

::: superqt.utils.thread_worker options: heading_level: 3

::: superqt.utils.create_worker options: heading_level: 3

::: superqt.utils.new_worker_qthread options: heading_level: 3