Wait, all delays are signaled when the image is saved? So, if I have a five minute delay in a process and I save the image 2 seconds later...
if Delay could implement #copy, then you could write like:On 6 December 2012 16:12, Igor Stasenko <siguctua@gmail.com> wrote:
> this is not a bug, but limitation.
> delay object(s) are not reentrant: means that you shall not use same
> delay instance multiple times, i.e.
>
> delay := 1 seconds asDelay.
> 10 timesRepeat: [ [ delay wait ] fork ].
>
> instead you shall create a fresh instance for each "delay" intent:
>
> 10 timesRepeat: [ [ 1 seconds asDelay wait ] fork ].
>
>
10 timesRepeat: [ [ delay copy wait ] fork ].
delay := 1 seconds asDelay.
this is because a Delay has 1:1 correspondence with its semaphore object.
and when you scheduling it multiple times, it will end up using same
semaphore for all instances of it...
and that's why you get weird behavior.
--
Best regards,
Igor Stasenko.