Suppose I have the following functions:
f1:=(a=RandomInteger[{1,24}]; b=RandomInteger[{1,24}]; Return[a+b]) f2:=If[f1==2,Print["snake eyes"]; Return[true], Print["nada"]; Return[false]] - How can I parallelize these functions so that each kernel continuously executes f1 until any one kernel obtains "snake eyes" (at which point the process should terminate)?
- Relating to the first question, once parallelized is there a more efficient way of writing or executing this resulting code?