Skip to content

Commit

Permalink
put ConcurrentStream behind the alloc feature
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Mar 17, 2024
1 parent 8936216 commit 2e1aa2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/future/future_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ impl<F: Future> FutureGroup<F> {

// 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
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/stream/stream_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub trait StreamExt: Stream {
S2: IntoStream<Item = T>;

/// Convert into a concurrent stream.
#[cfg(feature = "alloc")]
fn co(self) -> FromStream<Self>
where
Self: Sized,
Expand Down

0 comments on commit 2e1aa2d

Please sign in to comment.