How could something equivalent to lock in C# be implemented in JavaScript?
lock
So, to explain what I\'m thinking a simple use case is:
User clicks
Locks are a concept required in a multi-threaded system. Even with worker threads, messages are sent by value between workers so that locking is unnecessary.
I suspect you need to just set a semaphore (flagging system) between your buttons.