| 77 | |
| 78 | namespace { |
| 79 | void SleeperThread(CountDownLatch* l) { |
| 80 | // We use an infinite loop around WaitFor() instead of a normal Wait() |
| 81 | // so that this test passes in TSAN. Without this, we run into this TSAN |
| 82 | // bug which prevents the sleeping thread from handling signals: |
| 83 | // https://code.google.com/p/thread-sanitizer/issues/detail?id=91 |
| 84 | while (!l->WaitFor(MonoDelta::FromMilliseconds(10))) { |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | void fake_signal_handler(int signum) {} |
| 89 |