Thread:stop

Stops this thread. This has the following effects (in order):

  1. All child threads are stopped (in any order).
  2. Deferred functions for this thread are executed.
  3. Threads joining on this one are unblocked (in any order).

Usage

thread:stop()

Examples

local script = crystal.Script:new();

local thread = script:add_thread(function(self)
  print("This will not be printed");
end);

thread:stop();
script:update(0); -- Nothing happens

This site uses Just the Docs, a documentation theme for Jekyll.