GNOME Bugzilla – Bug 414986
Don't start the async thread for the system clock until needed
Last modified: 2007-03-12 15:28:13 UTC
Most applications never schedule an async clock callback. Accordingly, there's no need to create a new thread for every system clock and sub-class most of the time. Attaching a patch that defers creating the thread until the first async clock call.
Created attachment 83985 [details] [review] Defer starting the async clock thread until needed.
Created attachment 83986 [details] [review] take 2 try again, without extra cruft in the diff.
* gst/gstsystemclock.c: (gst_system_clock_init), (gst_system_clock_start_async), (gst_system_clock_id_wait_async): Defer starting the async system clock thread until the first async wait is scheduled. Fixes #414986.