From 80a87e861943cb89f4a191ac62cf3d50ee375ebd Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 7 Dec 2019 00:53:43 +0800 Subject: rewrite scheduler --- tests/modules/scheduler/test.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests') 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 -- cgit v1.3.1