metasync icon indicating copy to clipboard operation
metasync copied to clipboard

Implement QueuedMutex

Open tshemsedinov opened this issue 5 years ago • 0 comments

  • QueuedMutex allow us to wait for resource in queue
  • Multiple threads can register their interest to access resource
class QueuedMutex {
  status: SM_UNLOCKED | SM_LOCKED,
  async enter(callback), // if no callback passed Promise will be returned
  leave()
}

tshemsedinov avatar Mar 16 '19 12:03 tshemsedinov