3 ms·
If you run non-async (blocking) code in a fiber, then it will block the underlying OS thread. Functions need to be compiled in a special way and use IO in a ve
by cube2222 4y ago
If you run non-async (blocking) code in a fiber, then it will block the underlying OS thread.
Functions need to be compiled in a special way and use IO in a very specific way (async io) in order for them to be properly runnable by fibers.
This specific way is commonly referred to as "async", or "nonblocking", and all functions in Go are that way, including all IO functions available in the stdlib.