Skip to content

Commit

Permalink
lock the mutex around the condvar destruction (#8703)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjacob authored Mar 31, 2022
1 parent 504ec77 commit 0b881a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iree/base/internal/synchronization.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,9 @@ void iree_notification_deinitialize(iree_notification_t* notification) {
#if IREE_SYNCHRONIZATION_DISABLE_UNSAFE
// No-op.
#elif !defined(IREE_PLATFORM_HAS_FUTEX)
pthread_mutex_lock(&notification->mutex);
pthread_cond_destroy(&notification->cond);
pthread_mutex_unlock(&notification->mutex);
pthread_mutex_destroy(&notification->mutex);
#endif // IREE_PLATFORM_HAS_FUTEX
}
Expand Down

0 comments on commit 0b881a1

Please sign in to comment.