Sat, 28 Dec 2019 10:14:02 +0200
@background
src/Util.jl | file | annotate | diff | comparison | revisions |
--- a/src/Util.jl Sat Dec 28 02:08:30 2019 +0200 +++ b/src/Util.jl Sat Dec 28 10:14:02 2019 +0200 @@ -24,7 +24,8 @@ proj_norm₂₁ball!, curry, ⬿, - @threadsif + @threadsif, + @background ########## @@ -39,6 +40,12 @@ end)) end +macro background(bgtask, fgtask) + return :(t = Threads.@spawn $(esc(bgtask)); + $(esc(fgtask)); + wait(t)) +end + ######################## # Functional programming #########################