mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 16:26:17 +01:00
tests: Shorten another sleep/retry loop in thread-pool-slow
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
afc0883652
commit
c530debb62
@ -94,14 +94,9 @@ test_thread_stop_unused (void)
|
|||||||
|
|
||||||
g_thread_pool_stop_unused_threads ();
|
g_thread_pool_stop_unused_threads ();
|
||||||
|
|
||||||
for (i = 0; i < 5; i++)
|
/* Wait for threads to die. */
|
||||||
{
|
while (g_thread_pool_get_num_unused_threads () != 0)
|
||||||
if (g_thread_pool_get_num_unused_threads () == 0)
|
g_usleep (100);
|
||||||
break;
|
|
||||||
|
|
||||||
/* Some time for threads to die. */
|
|
||||||
g_usleep (G_USEC_PER_SEC);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_assert_cmpint (g_thread_pool_get_num_unused_threads (), ==, 0);
|
g_assert_cmpint (g_thread_pool_get_num_unused_threads (), ==, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user