Web Locks API in Node.js and browser
Race condition and deadlocks in asynchronous programming is not something strange but most of developers are not thinking about it and expects a miracle using promises and async/await. Parallel programming have well-known techniques and theory for concurrent computing and state management with different data structures to make them thread-safe. All those primitives like semaphore, mutex, spin-lock, monitors, barriers are usable for asynchronous programming as well but we may simplify them and combine with promises and sync/await to fulfill a concept of resource locking in single-threaded runtime.
- Researcher, lecturer, open-source enthusiast, 25 years in IT
- 3rd place in Ukraine by Github followers
- CTO at Salucyber, Chief architect at Metarhia
- Free video lectures > 200
- Metarhia community organizer, speaker at >40 conferences
- Expert in building distributed enterprise applications, systems architecture, cybernetics, system programming, DBMS, production automation, telemetry, network servers and protocols, system analysis