TryMany¶
Name | Mandatory | Description | Default | Type |
---|---|---|---|---|
⬅️ Input |
This shard takes a sequence of values as input. Each value from the sequence is provided as input to its corresponding copy of the scheduled Wire. The total number of copies of the specified Wire scheduled, will be the same as the number of elements in the sequence provided. | [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::AllSuccess 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] |
||
Wire |
No | The Wire to copy and schedule. | none |
None Wire [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. | none |
None Int |
This shard takes a sequence of values as input, schedules multiple copies of a specified Wire and executes them asynchronously. Each value from the sequence is provided as input to its corresponding copy of the scheduled Wire. The shard will then wait for all the scheduled Wires to end, and then, depending on the Policy specified, the shard will either return the output of the first successful Wire, return a sequence with all the output from all the copies of the specified Wire or stop execution of the current Wire if all the copies failed.
Details¶
All child wires scheduled makes copies of the parent wire's context variables. Any changes to said variables will not be reflected on the parent wire or other sibling wires scheduled using this shard.
Child wires are scheduled and executes inline. However, all child wires scheduled using this shard will execute in paralell. This shard however, will wait for all child wires to finish executing before it will continue its execution. Therefore any pauses on any child wire will also pause the parent wire.
Child wires are scheduled on the same mesh as the parent wire.
Examples¶
1 2 3 4 5 6 7 8 |
|
[info] [inline-shards-1] B
[info] [inline-shards-0] A
[info] [inline-shards-2] C