GNOME Bugzilla – Bug 328873
only one gst_bin_recalc_state allowed at a time
Last modified: 2006-02-20 12:27:26 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.
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.
applied patch locally, will be running it for some time to check it out.
I haven't seen any trouble from this, so I'm going to commit it.