On Mon, 7 Jun 1999, Guido van Rossum wrote: > Can you give a typical example where you use it, or is this just a gut > feeling? Well, the latest example was that I wanted to spawn a Python process to do viewing of NumPy arrays with Tk from within the Python interactive shell (without using a shell wrapper). It's trivial with a fork(), and non-trivial with threads. The solution I had to finalize on was to branch based on OS and do threads where threads are available and fork() otherwise. Likely 2.05 times as many errors as with a single solution =). > It's also dangerous -- e.g. unexpected errors may percolate down the > wrong stack (many mailman bugs had to do with forking), GUI apps > generally won't be cloned, and some extension libraries don't like to > be cloned either (e.g. ILU). More dangerous than threads? Bwaaahaahaa! =). fork() might be "deceivingly simple in appearance", I grant you that. But sometimes that's good enough. It's also possible that fork() without all of its process-handling relatives isn't useful enough to warrant the effort. --david
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4