mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 07:26:15 +01:00
gthreadpool: Mark an explicit leak as to be ignored
This thread is created once during the process’ lifetime and cannot be destroyed and recreated, as the thread scheduler settings might have changed since then. Mark the leak as explicit, mostly for documentation purposes — but it might quieten some static analysers. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Coverity CID: #1474614
This commit is contained in:
parent
054b96fd09
commit
59825c92e0
@ -30,6 +30,7 @@
|
||||
|
||||
#include "gasyncqueue.h"
|
||||
#include "gasyncqueueprivate.h"
|
||||
#include "glib-private.h"
|
||||
#include "gmain.h"
|
||||
#include "gtestutils.h"
|
||||
#include "gthreadprivate.h"
|
||||
@ -649,9 +650,12 @@ g_thread_pool_new_full (GFunc func,
|
||||
}
|
||||
else
|
||||
{
|
||||
GThread *pool_spawner = NULL;
|
||||
|
||||
spawn_thread_queue = g_async_queue_new ();
|
||||
g_cond_init (&spawn_thread_cond);
|
||||
g_thread_new ("pool-spawner", g_thread_pool_spawn_thread, NULL);
|
||||
pool_spawner = g_thread_new ("pool-spawner", g_thread_pool_spawn_thread, NULL);
|
||||
g_ignore_leak (pool_spawner);
|
||||
}
|
||||
}
|
||||
G_UNLOCK (init);
|
||||
|
Loading…
Reference in New Issue
Block a user