Skip to content

Commit

Permalink
deprecate push method
Browse files Browse the repository at this point in the history
  • Loading branch information
conorbros committed Jun 5, 2022
1 parent cbfda98 commit cc4a8cd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions futures-util/src/stream/futures_ordered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,19 @@ impl<Fut: Future> FuturesOrdered<Fut> {
self.in_progress_queue.is_empty() && self.queued_outputs.is_empty()
}

/// Push a future into the queue.
///
/// This function submits the given future to the internal set for managing.
/// This function will not call `poll` on the submitted future. The caller
/// must ensure that `FuturesOrdered::poll` is called in order to receive
/// task notifications.
#[deprecated]
pub fn push(&mut self, future: Fut) {
let wrapped = OrderWrapper { data: future, index: self.next_incoming_index };
self.next_incoming_index += 1;
self.in_progress_queue.push(wrapped);
}

/// Pushes a future to the back of the queue.
///
/// This function submits the given future to the internal set for managing.
Expand Down

0 comments on commit cc4a8cd

Please sign in to comment.