shred icon indicating copy to clipboard operation
shred copied to clipboard

Rewrite `ThreadPoolWrapper` to use atomic pointer

Open torkleyy opened this issue 6 years ago • 2 comments

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

torkleyy avatar Sep 09 '19 13:09 torkleyy

Yep, AtomicPtr is enough

AndreaCatania avatar Sep 09 '19 14:09 AndreaCatania

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

AndreaCatania avatar Sep 09 '19 14:09 AndreaCatania