1
0
Fork 0
mirror of synced 2024-05-17 03:12:18 +12:00

use threads.safe to avoid deadlock problem

This commit is contained in:
nagadomi 2016-10-21 00:21:57 +09:00
parent 1e80e45a03
commit 4998078d2a

View file

@ -54,6 +54,7 @@ local function transform_pool_init(has_resize, offset)
g_mutex_id = g_mutex:id()
g_transform_pool = threads.Threads(
nthread,
threads.safe(
function(threadid)
require 'pl'
local __FILE__ = (function() return string.gsub(debug.getinfo(2, 'S').source, "^@", "") end)()
@ -184,7 +185,7 @@ local function transform_pool_init(has_resize, offset)
n, conf)
end
end
end
end)
)
g_transform_pool:synchronize()
end