3 ms·
Something else about this kind of job cum go: "asynchronous I/O"* is extremely straightforward. Decoupling of the semantic threads ("goroutines") and OS-level t
by nothrabannosir 12y ago
Something else about this kind of job cum go: "asynchronous I/O"* is extremely straightforward. Decoupling of the semantic threads ("goroutines") and OS-level threads mean a blocking I/O op only blocks your goroutine, which is cheap. If you are doing heavy I/O, you can still program sequentially. No need to manage I/O event queues, threadpools nor callbacks.
Cherry on top: you never need to worry about blocking libraries, either. Every library automatically fits the model.
It may not have been their consideration, but for anything I/O heavy, this is a godsend.
Sorry for the tangent. This is now biting me on a new project and I feel like I didn't properly appreciate this until I didn't have it anymore..
* from the pov of OS threads