Hacker News new | ask | show | jobs
by platz 4005 days ago
> all Go code is always and automatically asynchronous

wat?

1 comments

I think that was an overstatement, but in the sense we're talking about with an HTTP request library, his overall point is true: Golang's runtime yields to other coroutines on I/O system calls. There usually† isn't much point in designing your own I/O scheduling system in Golang; you're almost always better off just forking off a zillion coroutines and letting them merge their results back across a single channel.

At least in 1.1, I couldn't write a fast port-scanner without doing my own scheduling, but that's a corner case.