help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] [bug] Delay issue


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] [bug] Delay issue
Date: Tue, 31 Jan 2012 10:19:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/28/2012 07:56 PM, Ladislav Marek wrote:
Hi,

after this change, code:

5 timesRepeat: [
     [(Delay forSeconds: 2) value: [] onTimeoutDo: [Error signal]] fork].
Processor activeProcess suspend.

I fixed this and will push soon:

diff --git a/kernel/Delay.st b/kernel/Delay.st
index a77da53..40298cc 100644
--- a/kernel/Delay.st
+++ b/kernel/Delay.st
@@ -143,9 +143,10 @@ created.'>
         | activeDelay |
        activeDelay := self activeDelay.
        activeDelay isNil ifTrue: [^self].
+       activeDelay == aDelay
+           ifTrue: [Queue removeLast]
+           ifFalse: [Queue identityRemove: aDelay ifAbsent: []].
        aDelay reset.
-       activeDelay == aDelay ifTrue: [^Queue removeLast].
-       Queue identityRemove: aDelay ifAbsent: [].
     ]

     Delay class >> startDelayLoop [

However I cannot reproduce the problem.

Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]