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

Explore pthread_once and friends for initialization #1538

Open
gdamore opened this issue Nov 29, 2021 · 0 comments
Open

Explore pthread_once and friends for initialization #1538

gdamore opened this issue Nov 29, 2021 · 0 comments

Comments

@gdamore
Copy link
Contributor

gdamore commented Nov 29, 2021

We currently use our own locks, which are a bit dodgy, and possibly less efficient.

We could conceivably use pthread_once or similar functions which should be highly optimized for the various platforms.

Note that restarting after nng_fini might not be supported, or we might need to separate functions that perform once-ever initialization from those that might need to be called after finalization (e.g. for starting up worker threads after they have been shut down.)

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