Skip to content
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

Add sync primitives to AsyncRuntime trait #1013

Open
1 of 5 tasks
drmingdrmer opened this issue Feb 18, 2024 · 1 comment
Open
1 of 5 tasks

Add sync primitives to AsyncRuntime trait #1013

drmingdrmer opened this issue Feb 18, 2024 · 1 comment
Labels
A-runtime Area: async-runtime

Comments

@drmingdrmer
Copy link
Member

drmingdrmer commented Feb 18, 2024

Yes. Tokio primitives do work in other runtimes, but they are not optimally-supported.

For example, Tokio has its own counters for cooperative multitasking (which, obviously, only make sense and are active if running within Tokio), other runtimes have their own algorithm for how not to block the runtime for too long. The same is true for resource monitoring support (e.g., via tracing in Tokio).

Another issue is that Tokio sync primitives allocate memory at unexpected points. This is OK if you are fine with your program going broken on OOM, but we don't have this luxury :-). We need to handle OOMs properly.

Originally posted by @schreter in #1010 (review)

TODO:

Copy link

👋 Thanks for opening this issue!

Get help or engage by:

  • /help : to print help messages.
  • /assignme : to assign this issue to you.

@drmingdrmer drmingdrmer added the A-runtime Area: async-runtime label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: async-runtime
Projects
None yet
Development

No branches or pull requests

1 participant