Fix tchange
parent
6746bd3d53
commit
382b5f9aa8
|
@ -1,4 +1,5 @@
|
|||
USING: namespaces io tools.test threads kernel ;
|
||||
USING: namespaces io tools.test threads kernel
|
||||
concurrency.combinators math ;
|
||||
IN: threads.tests
|
||||
|
||||
3 "x" set
|
||||
|
@ -16,3 +17,13 @@ yield
|
|||
] unit-test
|
||||
|
||||
[ f ] [ f get-global ] unit-test
|
||||
|
||||
{ { 0 3 6 9 12 15 18 21 24 27 } } [
|
||||
10 [
|
||||
0 "i" tset
|
||||
[
|
||||
"i" [ yield 3 + ] tchange
|
||||
] times yield
|
||||
"i" tget
|
||||
] parallel-map
|
||||
] unit-test
|
||||
|
|
|
@ -27,7 +27,7 @@ mailbox variables sleep-entry ;
|
|||
tnamespace set-at ;
|
||||
|
||||
: tchange ( key quot -- )
|
||||
tnamespace change-at ; inline
|
||||
tnamespace swap change-at ; inline
|
||||
|
||||
: threads 41 getenv ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue