[fork]

fork is a core slot, one of the keywords of the Hyperlambda language, in Hyperlambda, the language of Magic Cloud. Spawns a fire-and-forget background thread that evaluates the child lambda; the parent continues immediately.

  • Scope: provides fork

Arguments

Required arguments come first, then the optional ones in the order they are declared.

Argument Type Required Description
any node name lambda yes Executable child slot evaluated on the forked thread. Can be repeated.

Guide: How to use [fork]

JSON declaration

This is the complete declaration of fork, as the running system describes it. It is also published as slot.json.

JSON declaration
{
  "name": "fork",
  "description": "Spawns a fire-and-forget background thread that evaluates the child lambda; the parent continues immediately",
  "signature": {
    "children": {
      "*": {
        "type": "lambda",
        "description": "Executable child slot evaluated on the forked thread",
        "required": true,
        "mode": "ExecutableLambda",
        "cardinality": "OneOrMore",
        "role": "ExecutableBody",
        "evaluation": "EvalSelf",
        "projection": "Self"
      }
    },
    "scope": {
      "provides": "fork"
    }
  }
}

← for-each all core slots format →