mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
review
This commit is contained in:
parent
0dbc30a88c
commit
5b6f9be18c
2 changed files with 5 additions and 4 deletions
|
@ -209,14 +209,14 @@ end
|
|||
unittests.register("test_async_vector", test_vector_preserve, {async=true})
|
||||
|
||||
local function test_async_job_replacement(cb)
|
||||
core.ipc_set("unittests:end_blocking", nil)
|
||||
local capacity = core.get_async_threading_capacity()
|
||||
for _ = 1, capacity do
|
||||
core.handle_async(function()
|
||||
core.ipc_poll("unittests:end_blocking", 1000)
|
||||
end, function() end)
|
||||
end
|
||||
local job = core.handle_async(function(x)
|
||||
return x
|
||||
local job = core.handle_async(function()
|
||||
end, function()
|
||||
return cb("Canceled async job run")
|
||||
end)
|
||||
|
@ -229,7 +229,6 @@ local function test_async_job_replacement(cb)
|
|||
job = core.handle_async(function(x)
|
||||
return x
|
||||
end, function(ret)
|
||||
core.ipc_set("unittests:end_blocking", nil)
|
||||
if job:cancel() then
|
||||
return cb("AsyncJob:cancel canceled a completed job")
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue