Open torkleyy opened 5 years ago
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.
Arc
AtomicPtr
cc @AndreaCatania
Yep, AtomicPtr is enough
If you want I can do this change, let me know
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 forAtomicPtr
, and swap it out whenever the pool should be changed.cc @AndreaCatania