[TSan][libdispatch] Change test to have two simultaneous timers

Change test semantics by waiting for both timer callbacks at the end
instead of serializing operations: start/wait timer 1 then 2.

Reviewed By: kubamracek

Differential Revision: https://reviews.llvm.org/D60476

llvm-svn: 358204
This commit is contained in:
Julian Lettner 2019-04-11 18:14:16 +00:00
parent 0f7a0c71c6
commit edea731af2
1 changed files with 1 additions and 1 deletions

View File

@ -27,11 +27,11 @@ int main(int argc, const char *argv[]) {
dispatch_semaphore_signal(done);
});
dispatch_semaphore_wait(done, DISPATCH_TIME_FOREVER);
my_global2 = 10;
dispatch_after_f(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_MSEC)), q, NULL, &callback);
dispatch_semaphore_wait(done, DISPATCH_TIME_FOREVER);
dispatch_semaphore_wait(done, DISPATCH_TIME_FOREVER);
fprintf(stderr, "done\n");
return 0;