Trouble with Multi-threading
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Wed Dec 11 05:50:56 EST 2013
On Tue, 10 Dec 2013 11:21:32 -0500, dan.rose wrote:
> I am running PYTHON 2.7.3 and executing a PYTHON program that uses
> multi-threading. I am running this on a 64-bit Windows 2008 R2 server
> (Service Pack 1).
Hi Dan, and despite the emails from a few others, welcome. My further
comments below, interleaved with your questions.
> Three months ago, I was able to execute this program just fine. I ran
> the program and opened Task Manager and verified that the program
> successfully obtained all of the multiple threads it requested.
Sounds great, but unfortunately you don't actually show us the program,
so there's very little we can say about it.
If possible, please show us the actual program. If not, please try to
show us a simplified version which still displays the fault. If you can't
do that, at least tell us what result you expect, and what result you
actually get.
Are you sure you're talking about multi-threading? Do you perhaps mean
multi-processing? I'm not a Windows user, but I would expect that only
independent processes show up in Task Manager, not threads within a
single process.
> Now, when I go to run this same program (no changes to the program), I
> am getting this message:
If nothing has changed with the program, it's unlikely that the behaviour
will have changed. Since the behaviour has changed, something must be
different. If not in the program itself, perhaps something in it's
environment.
> Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit
> (AMD64)] on win32
> Type "copyright", "credits" or "license()" for more information.
>>>> ================================ RESTART
> ================================
>>>>
> <multiprocessing.queues.Queue object at 0x00000000042309E8>
How are you running the program? If you are using IDLE, the first step
when you run into problems is to *not* use IDLE. Instead of running the
program through the interactive IDLE environment, I recommend you try
running it directly in Python via the command line and see if the error
persists. Do you know how to do this or do you need help?
Lastly, Dan, if you don't mind I'd like to make a couple of requests.
This forum is both an email mailing list and a text-only Usenet news
group, were so-called "Rich Text" (actually HTML) emails are frowned
upon. If you don't mind, please disable "Rich Text" when sending messages
to this group, as many people get annoyed having to deal with posts like
yours that include content like:
<br><font size=2 face="sans-serif">
Also, if there's any way to drop the legal disclaimer when sending here,
that too would be appreciated.
Thanks for your cooperation, and feel free to ask any further questions,
hopefully you'll get a few more useful responses next time.
Regards,
--
Steven
More information about the Python-list
mailing list