Re: [racket-users] Help on Threads

2015-09-28 Thread Greg Hendershott
To add a tiny bit to Neil's excellent explanation, in case it wasn't clear: You can run your th.rkt program simply by doing racket th.rkt (That's probably all you need to know for now and for a small Racket program.) You can make this start faster by byte-compiling th.rkt after you change it

Re: [racket-users] Help on Threads

2015-09-28 Thread Neil Van Dyke
Sergey Yudin wrote on 09/28/2015 09:08 AM: By the way threads works but still output exists # # How to suppess it ? (void (thread ...)) You're seeing those messages because DrRacket likes to report the values of top-level expressions as it evaluates them. But it doesn't report anything wh

Re: [racket-users] Help on Threads

2015-09-28 Thread Sergey Yudin
On Mon, Sep 28, 2015 at 2:05 AM, Neil Van Dyke wrote: > Sergey Yudin wrote on 09/27/2015 04:50 PM: > >> Can you please explain whats wrong with the code ? >> > > The program exits because the main thread exits, even though the > "background" threads are still running. > > Add a `(sleep 30)` to th

Re: [racket-users] Help on Threads

2015-09-27 Thread Neil Van Dyke
Sergey Yudin wrote on 09/27/2015 04:50 PM: Can you please explain whats wrong with the code ? The program exits because the main thread exits, even though the "background" threads are still running. Add a `(sleep 30)` to the end of the file. Neil V. -- You received this message because you

[racket-users] Help on Threads

2015-09-27 Thread Sergey Yudin
Hello! I am very new to Racket and trying to use some samples file th.rkt #lang racket/base (thread (lambda () (for ([i 10]) (sleep 2) (printf "thread 1\n" (thread (lambda () (for ([i 20]) (sleep 1) (printf "t