Currently, Shared futures are only available when the std feature is enabled because they use std::sync::Mutex internally. This PR changes this so that Shared futures will fall back to using a spinlock when std is not enabled.
Alternatively, Shared could be changed to be generic over a mutex trait (e.g. lock_api::RawMutex, though it isn't implemented for std::sync::Mutex) to allow arbitrary user implementations.
Currently,
Shared
futures are only available when thestd
feature is enabled because they usestd::sync::Mutex
internally. This PR changes this so thatShared
futures will fall back to using a spinlock whenstd
is not enabled.Alternatively,
Shared
could be changed to be generic over a mutex trait (e.g.lock_api::RawMutex
, though it isn't implemented forstd::sync::Mutex
) to allow arbitrary user implementations.