[all-commits] [llvm/llvm-project] 4aaab6: [libc++] Fix wait_on_destruct.pass.cpp hanging som...

Eric via All-commits all-commits at lists.llvm.org
Mon Jun 30 08:54:33 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4aaab693148e3f98923f8f77ff02c665e9d25d10
      https://github.com/llvm/llvm-project/commit/4aaab693148e3f98923f8f77ff02c665e9d25d10
  Author: Eric <eric at efcs.ca>
  Date:   2025-06-30 (Mon, 30 Jun 2025)

  Changed paths:
    M libcxx/test/std/thread/futures/futures.async/wait_on_destruct.pass.cpp

  Log Message:
  -----------
  [libc++] Fix wait_on_destruct.pass.cpp hanging sometimes (#146240)

This test was deadlocking on my machine. 

It seems to me the intention of `in_async.wait(...)` was to wait for the
value to be set to true, which requires a call of `wait(false)` (waits
if value matches argument).

~As a drive by change scoped_lock to unique_lock, since there shouldn't
be any functional difference between the two in this test.~

I've addressed the issues with the `in_async` by switching to a
condition variable instead, since my first attempt at fixing this with
`in_async` wasn't sufficient.



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