Prevent mutex_lock from quitting with error ECANCELED