Skip to content

Conversation

@hymm
Copy link
Contributor

@hymm hymm commented Nov 4, 2025

Objective

  • I was experimenting with a library for combining multiple systems into one system that could be scheduled, but there wasn't a way of marking a function system run exclusively.

Solution

  • Add a method to SystemMeta to set the exclusive flag. Note that this PR doesn't add anyway to actually set the flag easily. You would have to create a custom system param to be able to set it.

Testing

  • Haven't tested. The one worry would be how it interacts with the executor, but in theory this should just work, since the flag is the only way the executor knows that a system is exclusive or not.

Future Work

  • Marking a function system as exclusive would also allow it to run inline in the multithreaded executor with some minor changes. This would probably be done through a system param similar to NonSendMarker.

@alice-i-cecile
Copy link
Member

I want a test for this before merging to ensure that we don't accidentally break this.

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-ECS Entities, components, systems, and events X-Contentious There are nontrivial implications that should be thought through S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged X-Contentious There are nontrivial implications that should be thought through

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants