Error in Semaphore>>critical:ifError:

Samuel Tardieu sam at rfc1149.net
Thu Sep 15 08:31:49 UTC 2005


>>>>> "Daniel" == Daniel Vainsencher <daniel.vainsencher at gmail.com> writes:

Daniel> I've often found myself signaling a Semaphore manually because
Daniel> something stopped working after some debugging. For example
Daniel> the NetNameResolver. The test included shows whats wrong, and
Daniel> how the same thing works in critical:

Terminating the current process is not considered an error and the
absence of #ensure: in #critical:ifError: seems to be the culprit.

Also, if I am not mistaken,

  [mutuallyExcludedBlock value] ifError: ...

can be replaced by

  mutuallyExcludedBlock ifError: ...

I've also updated the comment to note that the evaluation of the error
handling block takes place outside of the critical section (which
explains why the code is so convoluted btw).

See http://bugs.impara.de/view.php?id=1798 for a fix.

  Sam
-- 
Samuel Tardieu -- sam at rfc1149.net -- http://www.rfc1149.net/sam





More information about the Squeak-dev mailing list