Skip to content

spawn

Start one process from a definition with explicit fields. Available as spawn after import_globals() or mv.process.spawn.

Parameters

  • definition — A process constructor.
  • fields? — Starting fields for the new process.
  • options? — A table with attached (boolean).
local walk = process(function(self) frame() end)
spawn(walk, {x = 10, y = 20})

Related: process, mv.process.define.

See the lua processes guide for more examples and limits.