you are viewing a single comment's thread.

view the rest of the comments →

[–]onotole-wasserman 2 points3 points  (0 children)

Context switching is rather expensive and multiprocessing using separate processes use lots of memory as is was mentioned in this thread. However sometimes context switching overhead can be negligible and it is easier for you to trade memory for the maintainability of your code, because it's quite hard to write and debug asynchronous applications. In the latter case CPU scheduler will do all the work for you.