Closed altendky closed 4 years ago
I know, I know... do one thing well. But QTrio presently targets three distinct things. In time perhaps pieces will be spun off but for now they provide increasing layers you can use or not as they interest you.
The first layer allows you to run Trio tasks in the same thread as the Qt event loop. This is valuable as it let's the tasks safely interact directly with the Qt GUI objects. It is a small wrapper around Trio's guest mode. This layer is exposed directly under the qtrio
package.
Now that Qt and Trio are friends we can focus on making the relationship smoother. This second layer of QTrio is available in qtrio.signals
and allows for awaiting signals and iterating over the emissions of signals. This avoids the normal callback design of GUI systems in favor of Trio's structured concurrency allowing GUI responses to be handled where you want within the task tree.
Not everything Qt provides will be easily integrated into this structure. The rest of QTrio will grow to contain helpers and wrappers to address these cases.
In addition to the above three layers there is also adjacent support for testing.