TimedMutex allow us to lock shared resource for an interval less then timeout
class TimedMutex {
status: SM_UNLOCKED | SM_LOCKED,
constructor(timeout),
timeout: <number>,
async enter(callback), // if no callback passed Promise will be returned
leave()
}
TimedMutex
allow us to lock shared resource for an interval less then timeout