Commit 441f0b22 authored by Committed by Olivier Crête
tests: Remove a potential race from test-thread
A g_usleep() was introduced in commit e22ecb19 to fix a potential race where the non-main threads would finish all their work before the error_loop was started, leaving the error_loop to run for 30s then abort the test. A better fix, instead of doing a racy sleep, is to have the non-main threads spin until the error_loop is running. GLib takes care of all the locking for us, and since we don’t care about efficiency for test cases, spinning is fine (the wait is also going to be quite short).
Showing with 3 additions and 1 deletion