GNOME Bugzilla – Bug 768577
element: clean up thread pool from gst_task_cleanup_all()
Last modified: 2016-07-08 16:50:02 UTC
See commit message for the rational.
Created attachment 331085 [details] [review] element: clean up thread pool from gst_task_cleanup_all() This ensures that all async operations (started from gst_element_call_async()) have been completed and so there is no extra thread running. Fix races when checking for leaks on unit tests as some of those operations were still running when the leaks tracer was checking for leaked objects.
Review of attachment 331085 [details] [review]: ::: gst/gstelement.c @@ +3430,3 @@ + if (gst_element_pool) { + g_thread_pool_free (gst_element_pool, FALSE, TRUE); + gst_element_pool = NULL; Should we create a new pool as gsttasks.c:init_klass_pool() does?
Sorry, I completely missed your question in comment #2 before pushing this. As it turns out, the answer is yes :) commit 40727d9c838f1018f61c070f846454f28cde01c2 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Date: Fri Jul 8 16:36:01 2016 +0200 element: clean up thread pool from gst_task_cleanup_all() This ensures that all async operations (started from gst_element_call_async()) have been completed and so there is no extra thread running. Fix races when checking for leaks on unit tests as some of those operations were still running when the leaks tracer was checking for leaked objects. https://bugzilla.gnome.org/show_bug.cgi?id=768577 commit 7a0f4422fa1692dfdd8df9580676c8125be4280b Author: Tim-Philipp Müller <tim@centricular.com> Date: Fri Jul 8 17:46:06 2016 +0100 element: re-create threadpool after cleaning up tasks We don't free this from gst_deinit() but from gst_task_cleanup_all(), so more GStreamer API may be called. In particular makes unit tests work again with CK_FORK=no. https://bugzilla.gnome.org/show_bug.cgi?id=768577