mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
Grab thread_counter_pools LOCK when increasing leftover_task_counter.
2008-01-29 Sebastian Wilhelmi <wilhelmi@google.com> * tests/threadpool-test.c (test_thread_pools): Grab thread_counter_pools LOCK when increasing leftover_task_counter. Fixes race in test. (#512624, Simon Murray) svn path=/trunk/; revision=6406
This commit is contained in:
parent
757fc3f0a5
commit
fa7351324a
@ -1,3 +1,9 @@
|
||||
2008-01-29 Sebastian Wilhelmi <wilhelmi@google.com>
|
||||
|
||||
* tests/threadpool-test.c (test_thread_pools): Grab
|
||||
thread_counter_pools LOCK when increasing
|
||||
leftover_task_counter. Fixes race in test. (#512624, Simon Murray)
|
||||
|
||||
2008-01-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
@ -186,7 +186,10 @@ test_thread_pools (void)
|
||||
g_thread_pool_push (pool1, GUINT_TO_POINTER (i + 1), NULL);
|
||||
g_thread_pool_push (pool2, GUINT_TO_POINTER (i + 1), NULL);
|
||||
g_thread_pool_push (pool3, GUINT_TO_POINTER (i + 1), NULL);
|
||||
|
||||
G_LOCK (thread_counter_pools);
|
||||
leftover_task_counter += 3;
|
||||
G_UNLOCK (thread_counter_pools);
|
||||
}
|
||||
|
||||
g_thread_pool_free (pool1, TRUE, TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user