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

Last change on this file since 34718 was 34718, checked in by sjamaan, 23 months ago

release/5: Replace use by import in eggs

File size: 359 bytes
Line 
1;;;; simple-thread-test.scm
2
3
4(import (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.