@tkf, it’s ready to try now, if you’re interested:
using Pkg; pkg"add ParallelProcessingTools#master"
using ParallelProcessingTools
b = 0
foo() = global b = 9
bar() = 33
@mt_out_of_order begin
a = begin
sleep(1.5); println("step 1")
42
end
begin
sleep(1.0), println("step 2")
foo()
end
c = begin
sleep(0.5); println("step 3")
bar()
end
d = :trivial
end
(a, b, c, d) == (42, 9, 33, :trivial)
ParallelProcessingTools is a bit of a mix of pre-Julia-v1.3 workarounds and long-term usable functionality. It’s been around for a while, I’ll need to refresh some parts of it sometime.
I was thinking about adding something like that, yes - however, I’m still not sure about how to propagate worker-availability to child tasks in a consistent fashion.