2 ms·
Threads are one of the easiest paths to responsive applications. One thread for GUI and many for asynchronous background tasks(network, disk, compute heavy oper
by robmccoll 12y ago
Threads are one of the easiest paths to responsive applications. One thread for GUI and many for asynchronous background tasks(network, disk, compute heavy operations). Communicating and sharing between processes is more complex than between threads. Generally it is more OS-specific and processes have much higher overhead.
One easy example of a sane place for threading that would resonate with this crowd is HTTP servers. A thread pool to serve requests and a few asynchronous threads to handle DB operations and message queue interactions. Most frameworks are doing this for you (with real threads in languages that support it like C C++ Go Java and green threads in languages that don't Python Node/JS Ruby).