help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] Delay, BlockClosure and Process


From: Stefan Schmiedl
Subject: Re: [Help-smalltalk] Delay, BlockClosure and Process
Date: Sat, 11 Sep 2010 00:11:52 +0200

On Sat, 11 Sep 2010 01:37:36 +0800
Holger Hans Peter Freyther <address@hidden> wrote:

> Hi,
> 
> I am not seeing the light here...
> 
> Proc := [
>    [true] whileTrue: [
>        c_call_out.
>        (Delay forMilliSeconds: 500) wait.
>    ].
> ] fork
> 
> I would assume that c_call_out would be called every couple of milliseconds
> but it appears that when the delay is over the Process just exits. Why is that
> the case? How can I avoid it? How can I achieve something better? (well it
> would be nice to avoid the poll all together but that is for later).

Try running this code via gst-remote.

$1 gst-remote --server

$2 gst-remote --eval ' [ [true] whileTrue: [ 0 printNl. (Delay forSeconds: 1) 
wait ] ] fork'
$2 gst-remote --eval ' [ [true] whileTrue: [ 1 printNl. (Delay forSeconds: 1) 
wait ] ] fork'

output in $1:

gst-remote server started.
0
0
0
0
0
1
0
1
0
1
0
1

s.



reply via email to

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