Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions shuttle/src/future/batch_semaphore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,11 @@ impl BatchSemaphore {
/// permits and notifies all pending waiters.
pub fn close(&self) {
thread::switch();
self.close_no_scheduling_point();
}

/// Closes the semaphore without invoking `thread::switch`
pub fn close_no_scheduling_point(&self) {
self.init_object_id();
let mut state = self.state.borrow_mut();
if state.closed {
Expand Down