I'm wondering if I have the wrong idiom, or if it's a case of You Can't
Do That So Stop Trying.

Here's the code fragment:

[|delay| 
  delay := Delay forSeconds: 10. 
  delay wait. 
 '10 seconds are up' displayNl.] fork. 

'No delay, just after fork.' displayNl. 

(Delay forSeconds: 7) wait. 
'Seven seconds' displayNl. 

(Delay forSeconds: 5) wait. 
'Okay' displayNl. 
!

If I paste it directly into the interpreter, it hangs,  but a 
control-C will make it do the expected thing*.

If I put that in a file and run it from the file, it hangs, and
doesn't return.  A control-C exits the VM.

[*] I expect the output to be:

No delay, just after fork.
Seven seconds
10 seconds are up
Okay

This is with GST version 2.1.10

-S.


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to