# task

Responsible for providing a continuous execution or calls.
This is used for simply providing a "runtime" for lua states.

# Functions

# task.isthreaded(): boolean

task.isthreaded(): boolean
  • Checks if the current execution is from a threaded lua_State.

# task.defer(f: function)

task.defer(f: function)
  • Stores & calls the function at the next runtime cycle.

# task.delay(t: number, f: function)

task.delay(t: number, f: function)
  • Stores & calls the function after x amount of seconds.
  • This is also called in the runtime cycle.

# task.add(name: string, identity: string, callback: function)

task.add(name: string, identity: string, callback: function)
  • Adds a function to the continuous runtime

# task.remove(name: string, identity: string)

task.remove(name: string, identity: string)
  • Removes a function from the continuous runtime

# task.get(name: string, identity: string): function?

task.get(name: string, identity: string): function?
  • Attempts to retrieve a function from the continuous runtime's callbacks

# task.connect(callback: function, identity: string)

task.connect(callback: function, identity: string)
  • Different call style under the RBLX standard
  • Same as task.add(name: string, identity: string, callback: function)

# task.disconnect(name: string, identity: string)

task.disconnect(name: string, identity: string)
  • Different call style under the RBLX standard
  • Same as task.remove(name: string, identity: string)

# task.connection(name: string, identity: string): function?

task.connection(name: string, identity: string): function?
  • Different call style under the RBLX standard
  • Same as task.get(name: string, identity: string): function?

This is specific to the injectable variant of interstellar.

# task.invoke()

task.invoke()
  • Force interstellar to commit a runtime calculation.
  • This is responsible for inlining the execution of interstellar.
  • We recommend that you attach this to a routine that runs every frame/tick.

# task.subroutine(): memory.address

task.subroutine(): memory.address
  • Gets the address of the task subroutine.
  • This is responsible for inlining the execution of interstellar.
  • We recommend that you attach this to a routine that runs every frame/tick.

# task.deferred(state: boolean)

task.deferred(state: boolean)
  • This will disable the internal threaded runtime.
  • Makes interstellar depend on task.invoke() or task.subroutine()