Skip to content

Commit

Permalink
fixed: add missing remove
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Jul 9, 2016
1 parent 83be405 commit 7d12511
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sync/condvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ impl WaiterList {
}
}

#[allow(dead_code)]
fn remove(&mut self, waiter: &mut Waiter) {
let prev = waiter.prev.take();
let next = waiter.next.take();
Expand Down Expand Up @@ -215,6 +214,11 @@ impl Condvar {
drop(guard);
});

{
let _guard = self.lock.lock();
self.get_waiter_list().remove(&mut waiter);
}

let p = Processor::current_required();

match waiter.state() {
Expand Down

0 comments on commit 7d12511

Please sign in to comment.