[squeak-dev] Fixing Semaphore and SharedQueue
leves at elte.hu
Sun Nov 7 15:47:36 UTC 2010
I uploaded two packages to the Inbox.
Collections-ul.404 is an attempt to fix SharedQueue, so the image can
survive the following test:
bad := [[Sensor flushNonKbdEvents] repeat] forkAt: Processor userBackgroundPriority.
bad2 := [[Sensor eventQueue peek] repeat] forkAt: Processor userBackgroundPriority.
If the image doesn't freeze in a few seconds, terminate both processes.
The fix seems to be working, but it's incomplete and there are several
other issues in SharedQueue.
I see three possible solutions:
- fix SharedQueue
- migrate to SharedQueue2 and fix possible issues in Monitor
- migrate to Igor's atomic queue and solve any possible problems
Currently if a process is terminated during a queue operation, the queue
may break. This also true for SharedQueue2, because it uses Monitor >>
I also uploaded some fixes to Semaphore which can be found in
Kernel-ul.514. Most affected methods don't have senders in the image, so
it's hard to test them. I'd like to ask you to review the code and give
More information about the Squeak-dev