The Wayback Machine - https://web.archive.org/web/20211010045632/https://github.com/bevyengine/bevy/pull/2624
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

Make tokio / async-io optional task execution engines #2624

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

@hanabi1224
Copy link

@hanabi1224 hanabi1224 commented Aug 9, 2021

Make tokio / async-io optional task execution engines behind optional features

Objective

  • Be able to use tokio as task engine in user code.
  • It also fixes #2532

Solution

  • Leverage crate async-global-executor which uses compatible Task framework (async-executor) and has capabilities to switch to other task execution engines.
  • Code change to bevy is very minimal
  • It only adds one thin shim crate to the dependency tree on default feature set.
  • This also re-exports on_block method from bevy_tasks crate under bevy::tasks namespace, so that users don't need to depend on a task engine explicitly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants