Basic tests
This commit is contained in:
parent
65af565668
commit
5809a89eae
10
atomicity.lua
Normal file
10
atomicity.lua
Normal file
@ -0,0 +1,10 @@
|
||||
t = {}
|
||||
|
||||
threads.parallel(8, function(no)
|
||||
for i = 1, 1250 do
|
||||
table.insert(t, i)
|
||||
end
|
||||
end)
|
||||
|
||||
print("Expected: 10000")
|
||||
print(#t)
|
11
multifizz.lua
Normal file
11
multifizz.lua
Normal file
@ -0,0 +1,11 @@
|
||||
threads.parallel(1, function(no)
|
||||
for i = 1, 100000 do
|
||||
print(i)
|
||||
if i % 3 == 0 then
|
||||
print("Fizz")
|
||||
end
|
||||
if i % 5 == 0 then
|
||||
print("Buzz")
|
||||
end
|
||||
end
|
||||
end)
|
Loading…
Reference in New Issue
Block a user