[all-commits] [llvm/llvm-project] ab6c89: [libcxx] Don't hold the lock when calling notify_*...

Brotcrunsher via All-commits all-commits at lists.llvm.org
Mon Jan 13 07:16:44 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab6c89c220192159a66c1a91ad3dd892bad1c3b2
      https://github.com/llvm/llvm-project/commit/ab6c89c220192159a66c1a91ad3dd892bad1c3b2
  Author: Brotcrunsher <brotcrunsher at hotmail.de>
  Date:   2025-01-13 (Mon, 13 Jan 2025)

  Changed paths:
    M libcxx/src/shared_mutex.cpp

  Log Message:
  -----------
  [libcxx] Don't hold the lock when calling notify_* on gates in std::shared_mutex (#107876)

Holding the associated lock while calling notify_* on a
condition_variable is generally considered a pessimization, as the
notified thread might "instantly" wake up, notice that it can't acquire
the lock, and then goes back to sleep.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list