GNOME Bugzilla – Bug 679450
Deprecate clutter_threads_enter()/leave()
Last modified: 2012-07-11 20:15:05 UTC
The enter/leave API is not portable, and provides a false sense of security with regards to thread-safe programming with Clutter. The proper way to write threaded apps with Clutter is to use worker threads and schedule UI updates in the main loop. We also need to start thinking about threading if, internally, we want to switch to them for animations and event handling. Let's start by deprecating the enter/leave API, and use an internal replacement.
Created attachment 218094 [details] [review] Deprecate clutter_threads_enter()/leave() Acquiring the Clutter lock to mark critical sections is not portable, and not recommended to implement threaded applications with Clutter. The recommended pattern is to use worker threads, and schedule UI updates inside idle or timeout handlers within the main loop. We should enforce this pattern by deprecating the threads_enter()/leave() functions. For compatibility concerns, we need internal API to acquire the main lock during frame processing dispatch.
pushed to master.