Mutex spinning fix from https://github.com/faux123/tuna/commit/3746af06c20762fc9eb21be42b48707c826a734a