On Wed, Nov 16, 2011 at 6:30 PM, Dave Angel <d...@davea.name> wrote: > On 11/16/2011 01:22 PM, Dave Angel wrote: > >> (You're top-posting. Put your remarks AFTER what you're quoting) >> >> On 11/16/2011 12:52 PM, Jack Keegan wrote: >> >>> Ok, I thought that processes would do the same job as threads. So would >>> the >>> general rule be some thing like so: >>> >>> If I want another piece of work to run (theoretically) along side my main >>> script, and I want to share data between them, I should use a thread and >>> share data with the thread-safe queue. >>> If the work I want done can function and complete on its own, go for a >>> process. >>> >>> Would that be about right? >>> >>> >> Yes, with all the caveats I mentioned before. With some language >> implementations, and with some operating systems, and on some CPU-systems, >> the guidelines could be different. They all trade off in ways too complex >> to describe here. >> >> For example, if a thread is mostly doing I/O, it may be just as efficient >> as a separate process, even if sharing data isn't an issue. >> >> And in some languages, sharing data between processes isn't all that >> tough, either. >> >> >> Well, you sent me a mail without including the list (just use > Reply-All), and I tried to add the list in. Unfortunately, I picked the > wrong one, so i sent this to Tutor by mistake. I'll try to fix that now, > sorry.
Apologies, I usually reply-all and don't usually top-post. Was just rushing out the door when I responded last time. Cheers, Jack -- The earth is a very small stage in a vast cosmic arena. Think of the rivers of blood spilled by all those generals and emperors so that in glory and in triumph they could become the momentary masters of a fraction of a dot. - Carl Sagan [Pale Blue Dot]
-- http://mail.python.org/mailman/listinfo/python-list