3 ms·
A nice overview, unfortunately he stopped before the real insight. 'there is a fundamental conflict here between a thread wanting to go "up" and other threads
by beza1e1 15y ago
A nice overview, unfortunately he stopped before the real insight.
'there is a fundamental conflict here between a thread wanting to go "up" and other threads wanting to go "down"'
Can anybody explain that fundamental conflict?
- mooism2 15y agoEach 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.