Revert !2765 “GCancellable: Use per-instance mutex logic instead of global critical sections” for glib-2-82
This reverts all three commits from !2765 (merged), plus one follow-up commit which fixed a compiler warning in one of them.
Merge request !2765 (merged) has caused a thread safety regression in
GCancellableSource
disposal (see #3448). It landed too late in the cycle to fix
with any confidence before the 2.82 release, so the changes are being
reverted for the glib-2-82
branch and 2.82.0 release.
The changes will remain in place on main
so that a fix for #3448 can be put in place which works with per-instance locking.
Fixes: #3448 (for glib-2-82
)
Re-opens: #774 (closed), #2309 (closed), #2313 (closed) (for glib-2-82
, but they’re not going to be fixed on that branch at all; they’re known problems at this point)