Actors

create_comm_channel

Creates a communication channel for actor or thread coordination.

Syntax

create_comm_channel(): integer | Instance

Returns

NameTypeDescription
channelIdintegerNew communication channel identifier.
eventInstanceBindable event used by the communication channel.

Description

Creates a communication channel for actor or thread coordination.

Call it without parameters. The function reads the needed context from the current runtime state.

It returns channelId (integer), event (Instance). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Example call with placeholder values.

local result = create_comm_channel()
print(result)