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:
Stef Walter 2013-11-10 00:15:30 +01:00
parent 81d0ebe29c
commit dce83add18

View File

@ -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));
}
/**