Emmanuele Bassi 0da0e5122e main: Do not release the lock if it hasn't been acquired
On various systems, trying to release a mutex that hasn't been acquired
will result in a run-time error.

In order to avoid this, we trylock() the Big Clutter Lock™ and
immediately unlock() it, regardless of the result; if the lock was
already acquired, trylock() will immediately fail, and we can release
it; if the lock was not acquired, trylock() will succeed, and we can
release the lock immediately.

This is necessary to maintain binary compatibility and invariants for
Clutter applications doing:

  clutter_init()
  clutter_threads_enter()
  ...
  clutter_main()
  ...
  clutter_threads_leave()

instead of the correct:

  clutter_init()
  clutter_threads_enter()
  ...
  clutter_threads_leave()
  clutter_main()
  clutter_threads_enter()
  ...
  clutter_threads_leave()

With Clutter ≥ 1.12, the idiomatic form is:

  clutter_init()
  ...
  clutter_main()

given that the public Big Clutter Lock™ acquire/release API has been
deprecated, and nobody should take the lock outside of Clutter itself.

https://bugzilla.gnome.org/show_bug.cgi?id=679439
2012-10-05 17:36:06 +01:00
..
2011-11-10 19:05:39 +01:00
2012-06-23 08:23:11 +01:00
2012-09-03 22:34:52 +01:00
2012-02-23 12:01:11 +00:00
2012-04-27 12:30:48 +01:00
2012-04-27 12:28:49 +01:00
2011-10-19 15:23:55 +01:00
2012-04-27 12:30:48 +01:00
2012-06-05 12:28:25 +02:00
2012-01-16 23:35:16 +00:00
2012-06-11 13:47:29 +01:00
2012-04-30 17:17:41 +01:00
2012-04-30 17:17:41 +01:00
2011-06-07 16:06:24 +01:00
2012-04-27 12:30:50 +01:00
2012-04-27 12:30:48 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2012-04-27 12:30:50 +01:00
2012-02-23 17:21:57 +00:00
2012-09-03 20:54:43 +01:00
2012-04-27 12:30:48 +01:00
2012-09-03 20:54:43 +01:00
2012-04-30 17:17:41 +01:00
2012-08-20 18:28:22 +01:00
2012-08-20 18:28:22 +01:00