help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] [PATCH] kernel: Check the Semaphore before queuing


From: Holger Hans Peter Freyther
Subject: Re: [Help-smalltalk] [PATCH] kernel: Check the Semaphore before queuing the interrupt
Date: Mon, 20 Jan 2014 20:30:09 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jan 20, 2014 at 05:30:52PM +0100, Paolo Bonzini wrote:
> The patch looks good.
> 
> Alternatively, what about this?  It is a bit clearer to me, but the
> logic is pretty much the same.

Thanks!

>                  (self timedWaitOn: sem) ifTrue: [
> -                   proc signalInterrupt: (Kernel.TimeoutNotification on: 
> self).
> +                   timeout = 0 ifTrue: [
> +                       proc signalInterrupt: (Kernel.TimeoutNotification on: 
> self)].
>                  ].

If we ever get the execution of multiple native processes the timeout
code and the aBlock ensure:[] could run at the same time. How would we
make that mutual exclusive? add a lock/token then?




reply via email to

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