-
Notifications
You must be signed in to change notification settings - Fork 116
Introduce a platform agnostic sleep future #514
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
base: main
Are you sure you want to change the base?
Conversation
|
can't believe I forgot the license header 🤦 |
ecbe0d3 to
65eb8a8
Compare
|
Now rebased on top of #515, so a step closer to making tokio optional. |
|
So instead of relying on the respective runtime e.g. tokio (which as far as I can tell is not exactly a simple mechanism.), we are now using a thread? Mmh, it's hard to say if that works under high load as intended. Given how deeply |
|
Personally, I wish there was some standardized way to abstract over the common parts of the runtime. Tokio is great and there are many good reasons to use it but it can be quite limiting when dependencies effectively force everything around them to use it. |
For the record: I fully agree with you on that front. I was mostly wondering if that ideal world is practical feasible at the moment given the state of the ecosystem. As a maintainer, I would like to avoid code complexity and potential performance hits if they don't come with any benefits. And if only one of our dependencies requires
The problem is not primarily in |
|
The other places I see tokio being used right now are:
|
65eb8a8 to
81618c3
Compare
Which issue does this PR close?
Closes #1.
Rationale for this change
Step closer to removing tokio as a runtime dependency.
What changes are included in this PR?
New
Sleepfuture based onfutures-timercrate. It seems like a reputable crate that's used in many popular projects (likerstestandgoverner).I've also bumped the
randdependency from0.9to0.9.1as there are tests that depend on a re-export ofrand_corethat was introduced on0.9.1.Are there any user-facing changes?
No. Might some async scheduling behavior subtly when running with tokio.