diff options
| author | ame <[email protected]> | 2024-01-26 14:59:41 -0600 |
|---|---|---|
| committer | ame <[email protected]> | 2024-01-26 14:59:41 -0600 |
| commit | bafa906b6c51064e9ab429f81666feaf4c9e1740 (patch) | |
| tree | 2522edf8f7ae5b11a6d821cc37799b3bbf9eee35 /tests/s.lua | |
| parent | 39f9aa57e59ed2311b785c83cd3d07e5eeb5fb26 (diff) | |
testing multithreading
Diffstat (limited to 'tests/s.lua')
| -rw-r--r-- | tests/s.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/s.lua b/tests/s.lua new file mode 100644 index 0000000..51c0b6a --- /dev/null +++ b/tests/s.lua @@ -0,0 +1,15 @@ +require "llib" +function sleep (a) + local sec = tonumber(os.clock() + a); + while (os.clock() < sec) do + end +end + +for i=1,500 do + llib.net.spawn(function() + --sleep(1) + print("hi") + end) +end + +while true do end
\ No newline at end of file |
