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

Extending threadIsMain() assert #4613

Open
SirTyson opened this issue Jan 9, 2025 · 0 comments
Open

Extending threadIsMain() assert #4613

SirTyson opened this issue Jan 9, 2025 · 0 comments
Labels

Comments

@SirTyson
Copy link
Contributor

SirTyson commented Jan 9, 2025

Given the amount of parallelism being added to core with #4543, we now have many different types of threads responsible for different tasks. Binary asserts of !threadIsMain() and threadIsMain() no longer hold as much meaning, and we've had to loosen our thread asserts in a lot of places. We should extend the threadIsMain assert to all different "thread types," such as overlay thread, apply thread, etc. This shouldn't be too difficult. For each thread type we cal declare a 0 initialized thread::id like we currently do for mainThread, then we can initialize the value when spinning up the thread. It may also be useful to rename the main thread to something like "consensus thread" or "scheduling thread" so it carries a little more meaning.

@SirTyson SirTyson added the bug label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant