gthread: Emit a critical if g_rw_lock_reader_lock() fails
It can only fail if there’s been a leak or programmer error, so this is really unlikely to happen. At least make it obvious something has gone wrong, though, rather than silently carrying on and returning as if the reader lock has been acquired. Do the same for g_rw_lock_writer_lock(). It should be safe to use g_critical() for reporting the problems, since GRWLock is not used in gmessages.c, and printing a critical seems better than aborting, just in case we do hit the ‘maximum number of reader locks’ error code. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=756430
parent
f5e229c7