Closed nyanpasu64 closed 2 years ago
I was thinking of using AtomicOptionBox in a static variable, which can only be initialized using a const fn. Is the following worth adding to the library?
impl<T> AtomicOptionBox<T> { ... pub const fn new_none() -> AtomicOptionBox<T> { AtomicOptionBox { ptr: AtomicPtr::new(null_mut()), } }
Good call. This is in version 0.4.0, thanks to #3 by @kennytm.
I was thinking of using AtomicOptionBox in a static variable, which can only be initialized using a const fn. Is the following worth adding to the library?