mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 00:46:07 +00:00
move to test folder and fix import bug in shell
This commit is contained in:
14
tests/thread.ar
Normal file
14
tests/thread.ar
Normal file
@@ -0,0 +1,14 @@
|
||||
f() = do
|
||||
term.log("Hello, world!")
|
||||
term.time("threaded function")
|
||||
for (i from 0 to 1000000) do
|
||||
if (i % 100000 == 0) do
|
||||
term.log("i = " + i)
|
||||
term.timeEnd("threaded function")
|
||||
term.log("Goodbye, world!")
|
||||
|
||||
t = thread(f)
|
||||
t.start()
|
||||
term.time("main thread")
|
||||
t.join()
|
||||
term.timeEnd("main thread")
|
||||
Reference in New Issue
Block a user