Julia and Concurrency

Just to add, I believe this macro was shared in Slack as an easy way to try out the functionality:

macro par(expr)
    thunk = esc(:(()->($expr)))
    quote
        local task = Task($thunk)
        task.sticky = false
        schedule(task)
        task
    end
end
3 Likes