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

QSBR #13

Open
ibraheemdev opened this issue Jul 20, 2022 · 1 comment
Open

QSBR #13

ibraheemdev opened this issue Jul 20, 2022 · 1 comment

Comments

@ibraheemdev
Copy link
Owner

Applications that are constantly entering and leaving are marking threads as active/inactive for no reason; there is little benefit if threads are active 99% of the time. We could instead make enter a no-op (a big win) and have leave not mark threads as inactive (effectively become flush), acting more like QSBR.

@ibraheemdev
Copy link
Owner Author

ibraheemdev commented Apr 16, 2024

Making threads always active is problematic because threads do not necessarily need to call leave before exiting, which could leak memory. Without a global collector we can't really deal with leaked threads. Using process-wide barriers (see: membarrier) could improve enter performance enough to make this unnecessary (by allowing the store of active to be relaxed).

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