Skip to content
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

Support non-shared callbacks #16

Open
mxgrey opened this issue Aug 5, 2024 · 0 comments
Open

Support non-shared callbacks #16

mxgrey opened this issue Aug 5, 2024 · 0 comments

Comments

@mxgrey
Copy link
Contributor

mxgrey commented Aug 5, 2024

Currently callbacks are implemented in a way that they can be shared, i.e. reused by multiple different requests and/or workflows. This made a lot of sense in the first iteration of bevy_impulse when everything was one-shot and repeatedly creating and dropping systems doesn't make much sense.

Now that workflows are fully reusable, there may be legitimate use cases where someone wants to drop a callback system into a specific node of a workflow and not reuse the system anywhere else. In those cases, there is an unnecessary mutex locking being done each time the node is run.

We can avoid the mutex lock if we have two flavors of callbacks: unique and shared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant