Skip to content

Commit

Permalink
fix coop-related bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MikailBag committed Sep 26, 2020
1 parent 744ff6f commit 4290d68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio/src/sync/mpsc/chan.rs
Expand Up @@ -370,7 +370,7 @@ impl Semaphore for (crate::sync::batch_semaphore::Semaphore, usize) {
let waker = crate::util::waker_ref(&waker);
let mut noop_cx = std::task::Context::from_waker(&*waker);
let mut permit = Permit::new();
match self.poll_acquire(&mut noop_cx, &mut permit) {
match permit.poll_acquire(&mut noop_cx, 1, &self.0) {
Poll::Ready(Err(_)) => true,
Poll::Ready(Ok(())) => {
permit.release(1, &self.0);
Expand Down

0 comments on commit 4290d68

Please sign in to comment.