scsh-users
[Top] [All Lists]

Processes and threads

To: scsh@zurich.csail.mit.edu
Subject: Processes and threads
From: stktrc <stktrc@yahoo.com>
Date: 01 Nov 2003 16:40:25 +0100
Sender: news <news@sea.gmane.org>
See below.  Shouldn't "foo" be displayed?

$ scsh
Welcome to scsh 0.6.4 (Olin Shivers)
Type ,? for help.
> ,open threads
> (run (begin (spawn (lambda () (display "foo") (newline)))))
0
>

A work-around seems to be to put a short sleep immediately after the
spawn:

> (run (begin (spawn (lambda () (display "foo") (newline))) (sleep 1)))
foo
0
> 


<Prev in Thread] Current Thread [Next in Thread>