3 ms·
We all used co-routines in Windows 3.1 ("co-operative multitasking"), and the application Window would go blank. Then we got threads and we were able to kick o
by jpz 6y ago
We all used co-routines in Windows 3.1 ("co-operative multitasking"), and the application Window would go blank. Then we got threads and we were able to kick off compute to the background without having to be careful to yield throughout our background task.
For instance, of a spreadsheet computing values.
A more common use-case, however, is of trivially parallelizable problems which are completely isolated. Consider Monte-Carlo simulation for instance, where the thread hand-off to workers is done by a queue.
Making categorical statements like this political and unhelpful, and is one of the things that annoys me the most about IT culture.
- pdonis 6y ago> We all used co-routines in Windows 3.1 ("co-operative multitasking"), and the application Window would go blank. Yes, insisting on piping everything through a single message loop, including tasks that block, is not a good idea. The really bad part is that even though we're now on Windows 10, and Windows has claimed to have preemptive multitasking for a number of versions now, you can still see Windows applications lock up and their windows go blank when a blocking task happens that stalls their message loop. If there were ever a use case for threads (what? they can't run the GUI in a separate thread from background tasks? This is 2020, people! Even Javascript knows how to do this!), this is it.