use threads.safe to avoid deadlock problem
This commit is contained in:
parent
1e80e45a03
commit
4998078d2a
|
@ -54,6 +54,7 @@ local function transform_pool_init(has_resize, offset)
|
||||||
g_mutex_id = g_mutex:id()
|
g_mutex_id = g_mutex:id()
|
||||||
g_transform_pool = threads.Threads(
|
g_transform_pool = threads.Threads(
|
||||||
nthread,
|
nthread,
|
||||||
|
threads.safe(
|
||||||
function(threadid)
|
function(threadid)
|
||||||
require 'pl'
|
require 'pl'
|
||||||
local __FILE__ = (function() return string.gsub(debug.getinfo(2, 'S').source, "^@", "") end)()
|
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)
|
n, conf)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end)
|
||||||
)
|
)
|
||||||
g_transform_pool:synchronize()
|
g_transform_pool:synchronize()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue