-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Inter-handler parallelism #4
Comments
Closed
This was referenced Apr 5, 2024
rj00a
added a commit
that referenced
this issue
Apr 13, 2024
Closes #41 This PR removes the `'static` bound from the `Event` trait. `World::send` can now send events containing borrowed data from outside the `World`. However, `Sender::send` still requires `'static`. ## Additional Changes - Removed `World::send_many`. I wasn't sure how to make the lifetimes correct here, and the method doesn't have any real benefits until #4 or #5 is implemented. It could be added again if needed. - Added `Event::This<'a>`. Because `Event` is no longer `'static`, we need this associated type in order to get a canonical `TypeId`. It also resolves a tricky lifetime issue in the implementation of `HandlerParam` for `Receiver`/`ReceiverMut`. This does mean that `Event` is now an `unsafe` trait, but it can continue to be implemented safely with the derive macro.
Closing as not planned due to #42 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Inter-handler parallelism allows multiple handlers to run in parallel with each other, safely and automatically. This is one of
bevy_ecs
's most attractive features. However,bevy_ecs
's implementation has some problems in my experience.bevy_tasks
is known to be slower thanrayon
.evenio
can address these problems byrayon
instead ofbevy_tasks
. This goes well with Intra-system parallelism #3 since rayon is already exposed in the public API.evenio
encourages users to create small handlers that handle individual entities.The text was updated successfully, but these errors were encountered: