Skip to content

Task Coordinator

Manages handling of thread dispatches, caching, and serialization/deserialization

Properties


actors

  • {Actor}
    A list of actors, each with its own worker script

actorCount

  • number
    How many actors in the actor pool

connections

  • {RBXScriptConnection}
    A list of PreSimulation connections

Methods


DefineTask

Warning

The taskName can't end with -parallelizer-internal-def nor -parallelizer-internal-mem as they are reserved for internal use

Sends the serialized type definition and local memory specified under the message taskName-parallelizer-internal-def and taskName-parallelizer-internal-mem respectively

Parameters

Returns


DispatchTaskEqually

A proxy to DispatchTask, batchSize will be calculated automatically

Parameters

  • taskObject: Task
  • threadCount: number
  • callback: (result: {Types.SerializableValues}) -> void
  • useMergedBuffer: boolean?
  • ...: Types.SharedTableValues

Returns

  • void

DispatchTask

Creates a PreSimulation connection to deserialize the packets and dispatches the appropriate actors to the task. The callback will be called once the packets are gathered together. You can also choose to return the merged buffer instead of a table.

Parameters

  • taskObject: Task
  • threadCount: number
  • batchSize: number
  • callback: (result: {Types.SerializableValues}) -> void
  • useMergedBuffer: boolean?
  • ...: Types.SharedTableValues

Returns

  • void

Destroy

Disposes the ongoing dispatch connections and the actors

Parameters

Returns

  • void