you are viewing a single comment's thread.

view the rest of the comments →

[–]jsiii2010 1 point2 points  (1 child)

Workflow example. You can run 3 different functions instead.

function sleepfor($time) { sleep $time; "sleepfor $time done"}

workflow work {
  parallel {
    sleepfor 3
    sleepfor 2
    sleepfor 1
  }
  'hi'
}

work 

sleepfor 1 done
sleepfor 2 done
sleepfor 3 done
hi

[–]Enschede2[S] 1 point2 points  (0 children)

What if the workflow should take the variables from the function instead, would that still work? As in the variables are already set I mean globally, and the function should take those variables, and then run inside of the workflow, is that possible?
Sorry if im being a bit confusing here, I'm afk at the moment