Skip to content

Detach

Name Mandatory Description Default Type
⬅️ Input Any input type is accepted. The input of this shard will be given as input for the specified Wire Any
Output ➡️ Outputs the input value, passed through unchanged. Any
Wire No The wire to execute. none WireStringNone
Restart No If true, the specified wire will restart whenever the shard is called, even if it is already running. false Bool

Schedules and executes the specified Wire asynchronously. The current Wire will continue its execution independently of the specified Wire. Unlike Spawn, only one unique copy of the specified Wire can be scheduled using Detach. Future calls of Detach that schedules the same Wire will be ignored unless the specified Wire is Stopped or ends naturally.

Examples

1
2
3
4
5
6
@wire(hello {
  Msg("Hello")
})

Detach(Wire: hello)
Step(Wire: hello)

[error] Wire hello stopped before starting