4 ms·
A different coroutine gets a go.
by rumcajz 11y ago
A different coroutine gets a go.
- Animats 11y agoHow do they do that? Their own I/O library with asynchronous everything?
- rdtsc 11y agoBut only if it is using the aproved I/O socket operations from the library. What if it uses an operation from a regular socket librayr or if it runs a for loop or some CPU bound computation?
- rumcajz 11y agowhen using native i/o take care to use it in nonblocking manner. if it would block use libmill's fdwait() to wait while the file descriptor is unblocked. in case of long computations call yield() once in a while to give other coroutines a chance to run.