Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #55443
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Multiple scripts versus single multi-threaded script |
| Date | 2013-10-03 15:53 -0400 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-2604AC.15533803102013@news.panix.com> (permalink) |
| References | <f01b2e7a-9fc7-4138-bb6e-447d31179f2d@googlegroups.com> <roy-451497.12415103102013@news.panix.com> <mailman.684.1380819470.18130.python-list@python.org> <roy-D617DD.14283203102013@news.panix.com> <mailman.691.1380825390.18130.python-list@python.org> |
In article <mailman.691.1380825390.18130.python-list@python.org>, Chris Angelico <rosuav@gmail.com> wrote: > As to your corrupt data example, though, I'd advocate a very simple > system of object ownership: as soon as the object has been put on the > queue, it's "owned" by the recipient and shouldn't be mutated by > anyone else. Well, sure. I agree with you that threading in Python is about a zillion times easier to manage than threading in C/C++, but there are still things you need to think about when using threading in Python which you don't need to think about if you're not using threading at all. Transfer of ownership when you put something on a queue is one of those things. So, I think my original statement: > if you're looking for a short answer, I'd say just keep doing what > you're doing using multiple processes and don't get into threading. is still good advice for somebody who isn't sure they need threads. On the other hand, for somebody who is interested in learning about threads, Python is a great platform to learn because you get to experiment with the basic high-level concepts without getting bogged down in pthreads minutiae. And, as Chris pointed out, if you get it wrong, at least you've still got valid Python objects to puzzle over, not a smoking pile of bits on the floor.
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