Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #55455
| From | Jeremy Sanders <jeremy@jeremysanders.net> |
|---|---|
| Subject | Re: Multiple scripts versus single multi-threaded script |
| Date | 2013-10-04 10:02 +0200 |
| References | <f01b2e7a-9fc7-4138-bb6e-447d31179f2d@googlegroups.com> <roy-451497.12415103102013@news.panix.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.710.1380873727.18130.python-list@python.org> (permalink) |
Roy Smith wrote: > Threads are lighter-weight. That means it's faster to start a new > thread (compared to starting a new process), and a thread consumes fewer > system resources than a process. If you have lots of short-lived tasks > to run, this can be significant. If each task will run for a long time > and do a lot of computation, the cost of startup becomes less of an > issue because it's amortized over the longer run time. This might be true on Windows, but I think on Linux process overheads are pretty similar to threads, e.g. http://stackoverflow.com/questions/807506/threads-vs-processes-in-linux Combined with the lack of a GIL-conflict, processes can be pretty efficient. Jeremy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Multiple scripts versus single multi-threaded script JL <lightaiyee@gmail.com> - 2013-10-03 09:01 -0700
Re: Multiple scripts versus single multi-threaded script Roy Smith <roy@panix.com> - 2013-10-03 12:41 -0400
Re: Multiple scripts versus single multi-threaded script Chris Angelico <rosuav@gmail.com> - 2013-10-04 02:50 +1000
Re: Multiple scripts versus single multi-threaded script Roy Smith <roy@panix.com> - 2013-10-03 14:28 -0400
Re: Multiple scripts versus single multi-threaded script Chris Angelico <rosuav@gmail.com> - 2013-10-04 04:36 +1000
Re: Multiple scripts versus single multi-threaded script Roy Smith <roy@panix.com> - 2013-10-03 15:53 -0400
Re: Multiple scripts versus single multi-threaded script Chris Angelico <rosuav@gmail.com> - 2013-10-04 08:22 +1000
Re: Multiple scripts versus single multi-threaded script Dave Angel <davea@davea.name> - 2013-10-03 18:40 +0000
Re: Multiple scripts versus single multi-threaded script Jeremy Sanders <jeremy@jeremysanders.net> - 2013-10-04 10:02 +0200
Re: Multiple scripts versus single multi-threaded script Grant Edwards <invalid@invalid.invalid> - 2013-10-04 16:38 +0000
Re: Multiple scripts versus single multi-threaded script Chris Angelico <rosuav@gmail.com> - 2013-10-04 02:42 +1000
csiph-web