Skip to content

Commit

Permalink
add comment to poison clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjperez committed Jan 7, 2025
1 parent a138ff6 commit 3e0d578
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions micro-rdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ mod tests {
static LOCK: OnceLock<Mutex<()>> = OnceLock::new();
let lock = LOCK.get_or_init(|| Mutex::new(()));
lock.lock().unwrap_or_else(|lock_result| {
// the shared data is (), which is not modifiable
// therefore always in a consistent state
lock.clear_poison();
lock_result.into_inner()
})
Expand Down

0 comments on commit 3e0d578

Please sign in to comment.