-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to qtrio #1771
Migrate to qtrio #1771
Conversation
5d2746e
to
a997080
Compare
Codecov Report
@@ Coverage Diff @@
## master #1771 +/- ##
========================================
Coverage 87.70% 87.70%
========================================
Files 245 245
Lines 23895 23795 -100
========================================
- Hits 20957 20870 -87
+ Misses 2938 2925 -13
Continue to review full report at Codecov.
|
250184e
to
3fcfe68
Compare
A bit of cleanup is still needed, in particular:
|
@touilleMan @Max-7 The PR is now ready to be reviewed :) |
parsec/core/gui/trio_thread.py
Outdated
pass | ||
self._done.wait() | ||
def cancel(self): | ||
self.cancel_scope.cancel() | ||
|
||
|
||
class QtToTrioJobScheduler: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory this whole job system is no longer needed right ? (it is just kept to avoid a huge refactoring of the codebase)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need a nursery with some throttle logic (submit_throttled_job
), so it's still useful. Wrapping trio tasks as jobs that we can retrieve or cancel also makes sense. The major cleanup would be getting rid of the qt_on_success
and qt_on_error
signals.
More clean up can still be done:
|
…minating properly
In particuler, make sure the events are sent AFTER the inner state is mutated.
06d7b1f
to
dcf4551
Compare
122 signals and corresponding callbacks to migrate.. ± git grep "pyqtSignal(QtToTrioJob)" | wc -l
122 |
fa7f988
to
b4eb68e
Compare
4d48682
to
3a1f1ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A draft for a potential qtrio migration.
This means we don't have to deal with separate qt/trio threads and that we can perform qt calls withing trio coroutines.