Skip to content

TryMany

Name - Description Default Type
<input> [Any]
<output> [Any]
Wire The wire to spawn and try to run many times concurrently. None WireString
Policy The execution policy in terms of wires success. WaitUntil.AllSuccess WaitUntil
Threads The number of cpu threads to use. 0 Int

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
(Const ["A" "B" "C"])
(TryMany
 ;:Wire
 (Wire
  "print"
  (Log)
  "Ok")
 ;:Policy
 WaitUntil.AllSuccess
 ;:Threads
 12)
(Assert.Is ["Ok" "Ok" "Ok"] true)
[info] [print-1] A
[info] [print-2] B
[info] [print-1] C