Add a simple way to lock mutex (#29)