2005-03-28 23:45:13 -05:00
|
|
|
IN: temporary
|
2004-08-22 01:46:26 -04:00
|
|
|
|
|
|
|
USE: namespaces
|
2005-06-19 17:50:35 -04:00
|
|
|
USE: io
|
2004-08-22 01:46:26 -04:00
|
|
|
USE: test
|
|
|
|
USE: threads
|
2004-11-23 22:20:23 -05:00
|
|
|
USE: errors
|
2004-08-22 01:46:26 -04:00
|
|
|
|
|
|
|
! This only tests co-operative threads in CFactor.
|
2004-08-22 23:02:29 -04:00
|
|
|
! It won't give intended results in Java (or in CFactor if
|
|
|
|
! we ever get preemptive threads).
|
2004-08-22 01:46:26 -04:00
|
|
|
|
|
|
|
3 "x" set
|
|
|
|
[ yield 2 "x" set ] in-thread
|
|
|
|
[ 2 ] [ yield "x" get ] unit-test
|
2004-08-23 20:44:58 -04:00
|
|
|
[ ] [ [ flush ] in-thread flush ] unit-test
|
2004-11-23 22:20:23 -05:00
|
|
|
[ ] [ [ "Errors, errors" throw ] in-thread ] unit-test
|
2004-11-25 23:14:17 -05:00
|
|
|
yield
|
2006-08-18 00:03:45 -04:00
|
|
|
|
|
|
|
[ ] [ 1/2 sleep ] unit-test
|
|
|
|
[ ] [ 0.3 sleep ] unit-test
|
|
|
|
[ "hey" sleep ] unit-test-fails
|