mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
gthreadpool: Don't pass bad data to GThreadPool sorter
This causes sorters to crash. https://bugzilla.gnome.org/show_bug.cgi?id=711756
This commit is contained in:
parent
81d0ebe29c
commit
dce83add18
@ -818,8 +818,14 @@ g_thread_pool_wakeup_and_stop_all (GRealThreadPool *pool)
|
||||
|
||||
pool->immediate = TRUE;
|
||||
|
||||
/*
|
||||
* So here we're sending bogus data to the pool threads, which
|
||||
* should cause them each to wake up, and check the above
|
||||
* pool->immediate condition. However we don't want that
|
||||
* data to be sorted (since it'll crash the sorter).
|
||||
*/
|
||||
for (i = 0; i < pool->num_threads; i++)
|
||||
g_thread_pool_queue_push_unlocked (pool, GUINT_TO_POINTER (1));
|
||||
g_async_queue_push_unlocked (pool->queue, GUINT_TO_POINTER (1));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user