I need to write a simple TCP client and thought to give vibe.d a try. I did write a simple web application using vibe.d before and a more complicated one using boost::asio*. So I do know the event loop etc. basically work, what I don't quite understand is:

Which parts of vibe.d are actually asynchronous and which are not? There seems to be no indication in the documentation (on a per function basis), but I've looked briefly at the code and anything regarding TCP seems to go through the EventDriver, thus is asynchronous.

Now, if it's asynchronous by default, wouldn't I always need at least one task and one event loop? What happens if I call a async function outside of any task?

How does the 'download' example work? There is no event loop and no task.

import vibe.vibe;

void main()
{

auto f = openFile("test.html", FileMode.CreateTrunc);
f.write(download("http://google.com/"));

}

What if I would do

shared static this()
{
runTask({ download(something);});
runTask({ download(somethingElse); });
// use default main loop
}

Would those downloads run effectively in parallel, will the two tasks yield regularly?

I hope the post isn't as confusing as I am confused ;)

* which ended as quite the nightmare, using only callbacks and no coroutines at the time.