Expose SystemExecutor & open up ExecutorKind again #8027
Labels
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
D-Complex
Quite challenging from either a design or technical perspective. Ask for help!
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 ofpub fn set_executor(&mut self, executor: Box<dyn ParallelSystemExecutor>)
was replaced by a closed enum in the form ofExecutorKind
. 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.The text was updated successfully, but these errors were encountered: