Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent race condition in g_io_condition_get_type
Prevents race condition in function g_io_condition_get_type by ensuring that the initialization section for 'etype' is executed only once during a program's life time, and that concurrent threads are blocked until initialization completes. This changes solves the problem that concurrent threads could execute the check 'etype == 0' before any of them had initialized it, which in turn meant that multiple threads would then attempt to register the "GIOCondition" type. https://bugzilla.gnome.org/show_bug.cgi?id=750386
- Loading branch information