-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Expose SystemExecutor & open up ExecutorKind again #8027
Copy link
Copy link
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!
Type
Fields
Give feedbackNo fields configured for issues without a type.
What problem does this solve or what need does it fill?
During the implementation of #7267 & #6587 (stageless ECS schedules), the old
0.9API 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
ComputeTaskPoolinstead, 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_executorwhen used as the executor, so I rolled out my own implementation that I've been using successfully withbevy_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.