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

Remove unneeded if and main_thread param from flecs_run_pipeline_ops #1005

Merged
merged 2 commits into from
Jul 19, 2023

Conversation

ZeroErrors
Copy link
Contributor

@ZeroErrors ZeroErrors commented Jul 18, 2023

I was looking at changes from #1003 again and realised there was some redundant code that could be cleaned up.

Changelog

  • Removed unneeded if (main_thread || op->multi_threaded) from flecs_run_pipeline_ops
    • This isn't needed since flecs_run_pipeline only signals workers when op->multi_threaded is set.
    • I turned this into an assert instead just to make sure it doesn't happen.
  • Removed bool main_thread parameter from flecs_run_pipeline_ops since it is not needed.

@SanderMertens
Copy link
Owner

Hm, how does this work in multithreaded worlds with systems that aren't multithreaded? 🤔 Those should only be ran on the main thread.

@SanderMertens
Copy link
Owner

Ah, I think I see how this works, the worker threads aren't signaled when the active part of the schedule isn't multithreaded- cool! LGTM 🚀

@SanderMertens SanderMertens merged commit 2879e12 into SanderMertens:master Jul 19, 2023
47 checks passed
@ZeroErrors ZeroErrors deleted the simplify-pipeline-ops branch July 19, 2023 09:46
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

Successfully merging this pull request may close these issues.

2 participants