Task.desynchronize() Does not parallize into multiple threads

I’m using task.desynchronize() in multiple module scripts under different actors, however the tasks appear to not parallize in the microprofiler.

This is the hierarchy where I’m cloning the actors:
image

Main code:

for i = 1, actorCount do
task.spawn(function()
actors[i].Call()
end)
end

Module code:

local module = {}

module.Call = function()
	task.desynchronize()
	debug.profilebegin("Compute")
	
	local total = 0
	for i = 1, 1000000 do
		total = total + 1
	end
	
	debug.profileend("Compute")
	task.synchronize()
end

return module

However, in the microprofiler, they’re still all under one thread.

2 Likes

Hi @nin900500,

Is this still an issue you are experiencing?

If so, would you be able to provide a sample place file? I already have some idea what may be happening, but I’d like to have a sample place file to verify.

1 Like