You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugins could have a big advantage if they could create threads preferably in the same Lua state.
An example where this could be used: In WorldEdit you could read an large area, and do something in a different thread in that area. Afterwards the area could be written back into the world.
The usage could look like this:
-- CreateSphere is a function that creates a sphere in a cBlockArea-- BA is a blockarea that was read in before-- DstBlock is the block to make the sphere out of.localEditSes=cThread(CreateSphere)
EditSes:SetOnFinish(
function(... --[[Allthevaluesreturned]] )
--[[Writethe (possiblyreturned) blockareabackintheworld,andsendamessagetotheplayer]]end
)
EditSes:Start(BA, DstBlock)
The text was updated successfully, but these errors were encountered:
Where are you planning on getting the luaState from? That's the actual problem, because we can't use the plugins existing LuaState as it is not thread safe.
We discussed this in the forum as well: http://forum.mc-server.org/showthread.php?tid=1830
The plugins could have a big advantage if they could create threads preferably in the same Lua state.
An example where this could be used: In WorldEdit you could read an large area, and do something in a different thread in that area. Afterwards the area could be written back into the world.
The usage could look like this:
The text was updated successfully, but these errors were encountered: