3 ms·
Each level has its own (set of) locks. When a thread goes up/down, it needs to grab a lock from the higher/lower level before it can proceed. When one thread go
by mooism2 15y ago
Each level has its own (set of) locks. When a thread goes up/down, it needs to grab a lock from the higher/lower level before it can proceed. When one thread goes up at the same time as another thread goes down and they need the same locks, you get deadlock.
Is that what you were asking about, or is there something subtler I'm missing?
- beza1e1 15y agoThat is more of a fundamental problem of synchronization than about GUIs. Locks are anti-modular. So one solution could be to abandon locks, which is hardly a fresh insight. An event queue just makes the queue the one and only synchronization point.