aboutsummaryrefslogtreecommitdiff
path: root/test/threads.tm
diff options
context:
space:
mode:
Diffstat (limited to 'test/threads.tm')
-rw-r--r--test/threads.tm5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/threads.tm b/test/threads.tm
index e8d83f4a..f7acd013 100644
--- a/test/threads.tm
+++ b/test/threads.tm
@@ -2,6 +2,10 @@ enum Job(Increment(x:Int), Decrement(x:Int))
func main():
jobs := |:Job; max_size=2|
+ >> jobs:give(Increment(5))
+ >> jobs:peek()
+ = Job.Increment(x=5)
+
results := |:Int; max_size|
>> thread := Thread.new(func():
//! In another thread!
@@ -13,7 +17,6 @@ func main():
>> results:give(x-1)
)
- >> jobs:give(Increment(5))
>> jobs:give(Decrement(100))
>> jobs:give(Decrement(100))
>> jobs:give(Decrement(100))