If an attempt to schedule a Delay fails, cancel the Delay and schedule
and error notification (Morphic only). This corrects a problem in which
an invalid Delay results in a locked image when running in Morphic.
An invalid Delay can be created by specifying a delay duration that
overflows the size of a SmallInteger. For example, the following will
crash a Morphic image if this change set has not been applied:
| bigDelay |
bigDelay := Delay forMilliseconds: SmallInteger maxVal + 1.
bigDelay inspect.
[bigDelay wait.
Transcript show: 'I have been waiting a long time for this'; cr] fork.
(Delay forSeconds: 1) wait.
Smalltalk garbageCollect
This change set corrects the system crash problem reported as #854 on
Mantis (Subject: [BUG][VM] long Delay schedules a deferred image crash).
It does not resolve the remaining problem that Delays of duration longer
than about 12 days cannot be scheduled on Squeak.
Dave