Skip to content

Expand

Name Mandatory Description Default Type
⬅️ Input This shard takes a value of any type as input. This value is provided as input to every scheduled copy of the specified Wire. Any
Output ➡️ Depending on the Policy specified the shard will return a different output. WaitUntil::FirstSuccess will return the output of the first successful Wire. WaitUntil::SomeSuccess return a sequence with all the output from all the copies of the specified Wire. WaitUntil::FirstSuccess will either stop execution of the current Wire if any of the copies fail or return a sequence with all the output from all the copies of the specified Wire. [Any]
Size No The number of copies of the specified Wire to schedule. 10 Int
Wire No The Wire to copy and schedule. none NoneWire[Shard]
Policy No The execution policy for the shard to abide by. A copied Wire is only deemed successful if it did not have an internal failure (eg.through Assert) WaitUntil::AllSuccess WaitUntil
Threads No The number of cpu threads to use. Number specified can not be lower than 1. 1 Int

Schedules (n) number of copies of the specified Wire, where (n) is the number specified in the Size parameter. The parent Wire will wait until all the scheduled copies have ended and will either return a sequence of values outputs of all the copied Wires or the output of the first Wire that succeeds. Once done, it will continue with its own execution.

Examples

1
2
3
4
5
@wire(wide-test {
  Math.Multiply(2)
})

21 | Expand(Size: 10 Wire: wide-test Threads: 5) | Assert.Is([42 42 42 42 42 42 42 42 42 42] Break: true)