Implementing Semaphore with Time-Limited Permit Release
I was implementing a Semaphore withPermit which races the effect, or a time of 150ms, to release the permit again.
I wanted to make sure not to double release. so I realised I can just use
I wanted to make sure not to double release. so I realised I can just use
sem.release(1).cached()