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

Rewrite ThreadPoolWrapper to use atomic pointer #162

Open
torkleyy opened this issue Sep 9, 2019 · 2 comments
Open

Rewrite ThreadPoolWrapper to use atomic pointer #162

torkleyy opened this issue Sep 9, 2019 · 2 comments

Comments

@torkleyy
Copy link
Member

torkleyy commented Sep 9, 2019

There seems to be no need to have a lock around an option wrapping an Arc - since we have an (allocated) Arc, we can just use its raw pointer for AtomicPtr, and swap it out whenever the pool should be changed.

cc @AndreaCatania

@AndreaCatania
Copy link
Contributor

Yep, AtomicPtr is enough

@AndreaCatania
Copy link
Contributor

If you want I can do this change, let me know

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

No branches or pull requests

2 participants