3 ms·
A synchronous function cannot yield, but it can make sure another thread is available to take its place before it issues a blocking syscall. If properly constru
by notacoward 7y ago
A synchronous function cannot yield, but it can make sure another thread is available to take its place before it issues a blocking syscall. If properly constructed, synchronous stdlib functions would be safe to call from async functions. Any "executor" implementation that uses a fixed-size thread pool and is vulnerable to all threads in that pool being tied up this way at once is BROKEN.