summaryrefslogtreecommitdiff
path: root/tests/modules/scheduler/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-12-07 00:53:43 +0800
committerruki <[email protected]>2019-12-06 23:22:18 +0800
commit80a87e861943cb89f4a191ac62cf3d50ee375ebd (patch)
tree46ee698325fd58eb655f0609a9400f636d7a40bf /tests/modules/scheduler/test.lua
parent3e4ca8f5c05c297eface6fbff664f7aa991f6719 (diff)
rewrite scheduler
Diffstat (limited to 'tests/modules/scheduler/test.lua')
-rw-r--r--tests/modules/scheduler/test.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/modules/scheduler/test.lua b/tests/modules/scheduler/test.lua
index d61b663e3..36d1d97cd 100644
--- a/tests/modules/scheduler/test.lua
+++ b/tests/modules/scheduler/test.lua
@@ -6,12 +6,10 @@ function test_runjobs(t)
local task = function (a)
t:are_equal(a, "xmake!")
count = count + 1
- coroutine.yield()
end
for i = 1, 100 do
- scheduler.run(task, "xmake!")
+ scheduler.co_start(task, "xmake!")
end
- scheduler.runloop()
t:are_equal(count, 100)
end