[Q] Has SharedQueue a very subtle bug?

Jon Hylands jon at huv.com
Fri Apr 12 10:23:52 UTC 2002


On Fri, 12 Apr 2002 11:33:43 +0100, goran.hultgren at bluefish.se wrote:

> I tried to provoke this error but failed - my testcode might have been
> wrong. I know this might be "nitpicking" but I am curious and if it is
> indeed a bug it could save someone hours of debugging chasing this down
> - it wouldn't happen very often...

Since Squeak uses a cooperatively-scheduled process model for processes
that have the same priority, the only way this could happen would be for a
higher-priority process to become available at the exact micro-second that
the interpreter is between those two bytecodes in the method -- which seems
unlikely, and also exactly the kind of bug that would be very hard to both
reproduce and track down...

Given that my 1.0 GHz P-III gets close to 100 million bytecodes/second
(94,674,556 bytecodes/sec; 2,789,127 sends/sec), you'd need a timer
resolution of about 5 nano-seconds to reliably reproduce this as a bug,
which doesn't seem likely... 

Later,
Jon

--------------------------------------------------------------
   Jon Hylands      Jon at huv.com      http://www.huv.com/jon

  Project: Micro Seeker (Micro Autonomous Underwater Vehicle)
           http://www.huv.com



More information about the Squeak-dev mailing list