Actors
Actor discovery, parallel execution and communication channels.
Returns Actor instances or their actor threads.
print(#getactors())
for _, thread in ipairs(getactorthreads()) do
print(thread)
end
Returns whether the current context is running on a parallel actor thread.
print(isparallel(workspace))
print(checkparallel(workspace))
Runs Luau source on an actor.
local actor = getactors()[1]
run_on_actor(actor, [[print("running from actor")]])
Runs source on an actor thread.
local actor = getactors()[1]
runonactor(actor, [[print("compat alias")]])
Creates or resolves an inter-actor communication channel.
local channel = create_comm_channel("combat")
print(get_comm_channel("combat") == channel)
Returns the Actor instance owning the current thread, or nil.
local actor = get_current_actor()
print(actor)
Returns the Actor instance associated with a thread or Actor userdata.
local actor = getactorfromthread(coroutine.running())
print(actor)
Creates a cross-actor communication channel with Event and Fire.
local id, channel = createcommchannel()
channel.Event:Connect(print)
Returns a communication channel by id from any actor state.
local channel = getcommchannel(id)
channel:Fire("hello")