source: project/release/5/srfi-18/trunk/tests/simple-thread-test.scm @ 33353

Last change on this file since 33353 was 33353, checked in by evhan, 4 years ago

various import fixes in release/5/* after core library changes

File size: 354 bytes
Line 
1;;;; simple-thread-test.scm
2
3
4(use chicken.random srfi-18)
5
6
7(define (spin)
8  (do ((i 0 (add1 i)))
9      ((>= i 10))
10    (print (current-thread) " sleeps ...")
11    (thread-sleep! (random 3)))
12  (print (current-thread) " finished."))
13
14(thread-start! spin)
15(thread-start! spin)
16(spin)
17(print (current-thread) " waits ...")
18(thread-sleep! 3)
19(print "end.")
Note: See TracBrowser for help on using the repository browser.