That's a language issue though, rather than a mutex one. It's reasonably straightforward to fix that, as some languages (like Nim) do.