feat(reactor): implement option to use asyncio reactor#889
Merged
Conversation
5561862 to
d11808f
Compare
4c33598 to
419f2ee
Compare
1 task
419f2ee to
dc9a761
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #889 +/- ##
==========================================
- Coverage 85.35% 85.34% -0.01%
==========================================
Files 282 284 +2
Lines 22280 22443 +163
Branches 3366 3396 +30
==========================================
+ Hits 19018 19155 +137
- Misses 2592 2604 +12
- Partials 670 684 +14 ☔ View full report in Codecov by Sentry. |
msbrogli
requested changes
Dec 7, 2023
1 task
msbrogli
previously approved these changes
Dec 15, 2023
jansegre
previously approved these changes
Dec 18, 2023
0a39eff to
ddb0b61
Compare
The base branch was changed.
15ba731 to
e84f95d
Compare
msbrogli
approved these changes
Dec 18, 2023
jansegre
approved these changes
Dec 19, 2023
This was referenced Dec 20, 2023
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #888
Motivation
Considering the general improvements we plan to make in the full node related to concurrent and parallel execution, using async/await and multiprocessing, it may be useful to interop with Python's native
asyncio. Currently we used Twisted's default reactor, but they provide a reactor that has compatibility with asyncio: AsyncioSelectorReactor. In theory, it is a drop-in replacement for what we're currently using.This PR adds an experimental CLI option to enable this custom reactor, so we can test its usage in some full nodes for a while. Then, we'll have data to assess whether it's worth it using it as the default, in the future.
Acceptance Criteria
--x-asyncio-reactorCLI option to enable using the asyncio reactor.get_global_reactor()to add support for installing the asyncio reactor.Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged