2 ms·
It's a hack for sure, you are essentially creating a new little operating system within one binary. But it is an architecture that works remarkably well for qui
by jacquesm 6y ago
It's a hack for sure, you are essentially creating a new little operating system within one binary. But it is an architecture that works remarkably well for quite a few applications: message switches, games and so on. And it even works on architectures where you only get one thread of execution.
- dwohnitmok 6y agoAh I see, you perhaps mean a slightly more general concept of coroutines than I was thinking about? Closer to something that fits a thread-like interface on top of actual threads regardless of whether it's being done through direct yields or intermediated by some sort of scheduler? Basically the crucial point being getting concurrency without the need for actual parallelism?
- jacquesm 6y agoYes. And you can simulate that perfectly using the co-routine mechanism.