Skip to content

Commit

Permalink
Merge pull request #352 from mqudsi/async_signal_safety
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu authored Sep 6, 2022
2 parents e44aceb + ba57312 commit bd01cb7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/src/parking_lot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,10 @@ pub unsafe fn park(
///
/// The `callback` function is called while the queue is locked and must not
/// panic or call into any function in `parking_lot`.
///
/// The `parking_lot` functions are not re-entrant and calling this method
/// from the context of an asynchronous signal handler may result in undefined
/// behavior, including corruption of internal state and/or deadlocks.
#[inline]
pub unsafe fn unpark_one(
key: usize,
Expand Down Expand Up @@ -801,6 +805,10 @@ pub unsafe fn unpark_one(
/// You should only call this function with an address that you control, since
/// you could otherwise interfere with the operation of other synchronization
/// primitives.
///
/// The `parking_lot` functions are not re-entrant and calling this method
/// from the context of an asynchronous signal handler may result in undefined
/// behavior, including corruption of internal state and/or deadlocks.
#[inline]
pub unsafe fn unpark_all(key: usize, unpark_token: UnparkToken) -> usize {
// Lock the bucket for the given key
Expand Down

0 comments on commit bd01cb7

Please sign in to comment.