When a Task waits does it block the whole Julia thread, or does it return
control to the scheduler to schedule in other tasks? See the following test
code:

function task_test()
    function task()
        info("started task")
        wait()
    end
    info("about to start task")
    yieldto(Task(task))
    info("task yielded back to main context")
end

I would expect the output of running task_test() to be

about to start task
started task
task yielded back to main context

but instead it seems that when the task waits, it doesn't hand control back
to the main context. I'm running this from the REPL, if that makes any
difference.

-s

Reply via email to