Don't use sleep in this test as the thread may terminate before it returns, possibly resulting in crashes that the existing comment warned about, and definitely resulting in TSAN errors. Also ensure that the thread doesn't terminate instead of just hoping that it doesn't do it because it doesn't have time to run 30 iterations of its entry function by passing the special value of 0 to ctor, which explicitly prevents the thread from terminating on its own. |
||
|---|---|---|
| .. | ||
| atomic.cpp | ||
| misc.cpp | ||
| queue.cpp | ||
| tls.cpp | ||