-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
What problem does this solve or what need does it fill?
During the implementation of #7267 & #6587 (stageless ECS schedules), the old 0.9
API of pub fn set_executor(&mut self, executor: Box<dyn ParallelSystemExecutor>)
was replaced by a closed enum in the form of ExecutorKind
. I'd like to see a similar API exposed again to be able to implement custom executors - specifically a Rayon-based one.
What solution would you like?
I think it would be sensible to add a variant like ExecutorKind::Custom(Box<dyn SystemExecutor>)
.
What alternative(s) have you considered?
A better abstraction level could be to allow other implementations of ComputeTaskPool
instead, but I'm not familiar enough with the internals to know if it's feasible.
Additional context
I wasn't happy with the behavior (#4161) or performance of async_executor
when used as the executor, so I rolled out my own implementation that I've been using successfully with
bevy_ecs` 0.6.0 - 0.9.1. As of 0.10.0, there doesn't seem to be a way to use a custom executor.