switch from GIL to our own mutex