-
Notifications
You must be signed in to change notification settings - Fork 76
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
Support async_std as a runtime #173
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #173 +/- ##
==========================================
+ Coverage 79.20% 79.23% +0.02%
==========================================
Files 49 50 +1
Lines 9123 9153 +30
==========================================
+ Hits 7226 7252 +26
- Misses 1897 1901 +4
☔ View full report in Codecov by Sentry. |
be8f1cc
to
74ef222
Compare
A note on performanceRunning our benchmark suite we can measure somewhat the performance delta between Starting with
Then running again with the
This shows that actor creation is more expensive in |
This PR adds support for the
async-std
runtime as an alternative to thetokio
runtime. It can be enabled with theasync-std
feature.Note:
ractor
uses some core primitives or functionality of structs fromtokio
which required some wrapping to support inasync-std
. Specifically:tokio
'sJoinHandle
has functionality to determine if aJoinHandle
is finished as well as to abort it without consuming the handle. These required some wrapping in ourasync_std_primatives
module to support similar functionality without great rewrites ofractor
. Basic functionality test coverage is added for our customJoinHandle
implementation.tokio
has aJoinSet
which has some minor syntactical changes from the standardFuturesUnordered
from the futures crate which we can leverage in its stead. Again a small wrapper was added.tokio
has anInterval
which is used to fix send_interval can drift #57, this doesn't exist inasync-std
aside from a basicsleep
implementation, so we had to add a custom version of it.