After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 328873 - only one gst_bin_recalc_state allowed at a time
only one gst_bin_recalc_state allowed at a time
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2006-01-27 17:44 UTC by Jan Schmidt
Modified: 2006-02-20 12:27 UTC
See Also:
GNOME target: ---
GNOME version: ---

Allow multiple simultaneous state recalculations (1.13 KB, patch)
2006-01-31 11:31 UTC, Jan Schmidt
none Details | Review

Description Jan Schmidt 2006-01-27 17:44:55 UTC
At the moment, GstBin creates the threadpool for state recalculations with a maximum number of 1 thread. There seems to be logic in gst_bin_recalc_state to handle the case where multiple threads enter the function (it sets a polling flag), so it seems reasonable that the threadpool should allow more threads - otherwise an application with multiple toplevel bins cannot have them all recalculating themselves in parallel.

Filing a bug because either Andy or Wim should check my logic is correct.

If it is, we should set the maximum in g_thread_pool_new to -1, and probably take the bin lock and check ->polling is FALSE before bothering to push a new recalc thread onto the pool.
Comment 1 Jan Schmidt 2006-01-31 11:31:29 UTC
Created attachment 58460 [details] [review]
Allow multiple simultaneous state recalculations

Seems to work fine here. I'm not sure how to add a testcase for it, plus it's hard to test the concurrency stuff on a single cpu machine anyway.
Comment 2 Wim Taymans 2006-02-14 16:41:55 UTC
applied patch locally, will be running it for some time to check it out.
Comment 3 Jan Schmidt 2006-02-20 12:25:53 UTC
I haven't seen any trouble from this, so I'm going to commit it.