diff --git a/src/future/future_group.rs b/src/future/future_group.rs index 82fd60e..dd775e0 100644 --- a/src/future/future_group.rs +++ b/src/future/future_group.rs @@ -270,7 +270,7 @@ impl FutureGroup { // Set the corresponding state this.states[index].set_pending(); - let mut readiness = this.wakers.readiness().lock().unwrap(); + let mut readiness = this.wakers.readiness(); readiness.set_ready(index); key diff --git a/src/lib.rs b/src/lib.rs index 0d3bf39..c3ed456 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -82,10 +82,13 @@ pub mod prelude { pub use super::stream::Merge as _; pub use super::stream::Zip as _; + #[cfg(feature = "alloc")] pub use super::concurrent_stream::ConcurrentStream; } +#[cfg(feature = "alloc")] pub mod concurrent_stream; + pub mod future; pub mod stream; diff --git a/src/stream/stream_ext.rs b/src/stream/stream_ext.rs index c9e44df..b025015 100644 --- a/src/stream/stream_ext.rs +++ b/src/stream/stream_ext.rs @@ -27,6 +27,7 @@ pub trait StreamExt: Stream { S2: IntoStream; /// Convert into a concurrent stream. + #[cfg(feature = "alloc")] fn co(self) -> FromStream where Self: Sized,