metarhia / metasync

Asynchronous Programming Library for JavaScript & Node.js
https://metarhia.com
MIT License
206 stars 35 forks source link

Implement QueuedMutex #413

Open tshemsedinov opened 5 years ago

tshemsedinov commented 5 years ago
class QueuedMutex {
  status: SM_UNLOCKED | SM_LOCKED,
  async enter(callback), // if no callback passed Promise will be returned
  leave()
}