You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RFC rust-lang/rfcs#2788 introduced a (still unstable) std::lazy module. While the Lazy and OnceCell types of this module are also available in core, their Sync counterparts are not because of their Mutex dependency.
The spin crate already provides a spin::Once as an alternative to the std::lazy::SyncOnceCell type (albeit with a different API). It would be useful if it would also provide an alternative to the std::lazy::SyncLazy type. This way, we could avoid depending on the lazy_static crate.
The text was updated successfully, but these errors were encountered:
Do you think this could be implemented as a thin layer on top of Once, or perhaps even integrated into it? The only obstacle to that I can forsee is the take method but I could easily add support for something like that to Once.
RFC rust-lang/rfcs#2788 introduced a (still unstable)
std::lazy
module. While theLazy
andOnceCell
types of this module are also available incore
, theirSync
counterparts are not because of theirMutex
dependency.The
spin
crate already provides aspin::Once
as an alternative to thestd::lazy::SyncOnceCell
type (albeit with a different API). It would be useful if it would also provide an alternative to thestd::lazy::SyncLazy
type. This way, we could avoid depending on thelazy_static
crate.The text was updated successfully, but these errors were encountered: