c9324b2f30
This patch changes the `Semaphore(permit=1)` for a `Mutex`: the semantics is strictly equivalent, but it removes the need to guarantee there is a single permit.