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

Last change on this file since 31403 was 31403, checked in by felix winkelmann, 7 years ago

added srfi-18 and srfi-69 eggs

File size: 346 bytes
Line 
1;;;; simple-thread-test.scm
2
3
4(use srfi-18 extras)
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.