msg111013 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2010-07-21 07:07 |
Seems like os.environ is shared between multiple threads. This should be documented at least in threading chapters. |
|
|
msg111021 - (view) |
Author: Eric V. Smith (eric.smith) *  |
Date: 2010-07-21 08:43 |
I'm not sure where you'd put this. The defining characteristic of threads is that _all_ objects are shared among them. |
|
|
msg111022 - (view) |
Author: Konstantin Zemlyak (zart) |
Date: 2010-07-21 08:50 |
Environment variables have always been process-wide. It doesn't deserve any special mention in threads documentation. |
|
|
msg111033 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2010-07-21 10:09 |
On Wed, Jul 21, 2010 at 11:43 AM, Eric Smith <report@bugs.python.org> wrote: > > I'm not sure where you'd put this. The defining characteristic of threads is that _all_ objects are shared among them. Where is this defining characteristic of threads is described? |
|
|
msg111035 - (view) |
Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) *  |
Date: 2010-07-21 10:31 |
>> I'm not sure where you'd put this. The defining characteristic of threads is that _all_ objects are shared among them. > Where is this defining characteristic of threads is described? in http://docs.python.org/library/thread.html """...multiple threads of control sharing their global data space...""" That's how threads are understood in all programming languages. |
|
|
msg111037 - (view) |
Author: Georg Brandl (georg.brandl) *  |
Date: 2010-07-21 11:05 |
Closing in agreement with Eric/Amaury. |
|
|
msg111100 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2010-07-21 18:35 |
> in http://docs.python.org/library/thread.html > """...multiple threads of control sharing their global data space...""" > > That's how threads are understood in all programming languages. Do you mean this one? """This module provides low-level primitives for working with multiple threads (also called light-weight processes or tasks) — multiple threads of control sharing their global data space.""" It is surely confusing and doesn't explain anything to people who never worked with threads (like me). It should either be split in two sentences or simplified. http://en.wikipedia.org/wiki/Thread_(computer_science) says that threads can share resources, but not necessarily do so. |
|
|
msg111128 - (view) |
Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) *  |
Date: 2010-07-21 22:19 |
Quoting the wikipedia page: """multiple threads within a process share state as well as memory and other resources""" If you never worked with threads, then you really need a tutorial about threads, or even a general explanation about threads; the reference manual is not such a place. Programming with threads has really complex aspects that are not inherent to Python. [Some people will also say: if you never worked with threads, don't start] |
|
|
msg111162 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2010-07-22 10:15 |
I have to debug CGIHTTPServer test case that apparently uses threads, and I expected to find at least some pointer about "what exactly a thread in Python is". I hope Python Manual is not only for system programmers. They do not need the manual anyway - they already know everything and there are plenty tutorials for them elsewhere. -- "please remove http://docs.python.org/ and put in a better documentation, I wasted so much time reading that bad documentation that now I hate it and I will never write code in python" (c) Mario Santamaria |
|
|
msg111163 - (view) |
Author: Stefan Krah (skrah) *  |
Date: 2010-07-22 10:23 |
I agree with Eric, Konstantin, Amaury and Georg. Closing for the third time. |
|
|
msg111165 - (view) |
Author: Georg Brandl (georg.brandl) *  |
Date: 2010-07-22 10:37 |
Anatoly, I don't think it is a good idea to use signatures in tracker comments. |
|
|