Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'win32': 0.03; '64-bit': 0.07; 'memory.': 0.07; 'restart': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'changes': 0.15; 'windows': 0.15; '2.7.3': 0.16; 'cc:name:python list': 0.16; 'fine.': 0.16; 'program),': 0.16; 'requested.': 0.16; 'wrote:': 0.18; 'bit': 0.19; '>>>': 0.22; 'cc:addr:python.org': 0.22; '>>>': 0.24; 'looks': 0.24; 'cc:2**0': 0.24; 'task': 0.26; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'dec': 0.30; 'message- id:@mail.gmail.com': 0.30; 'getting': 0.31; 'run': 0.32; 'running': 0.33; 'skip:& 30': 0.33; 'subject:with': 0.35; 'received:google.com': 0.35; 'executing': 0.36; 'server': 0.38; 'skip:& 10': 0.38; 'manager': 0.38; '2008': 0.38; 'rather': 0.38; 'skip:& 20': 0.39; 'ago,': 0.61; 'more': 0.64; 'obtained': 0.96; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Q59WVmm8Ai/XamfkaD1MN2wlUuXdpvCac1/GqLm2q2c=; b=LplEuy0rLoSr4PHvU384NAQz2/Kjag6EMNehWIUUPhFBMaCE+xUAjutkwy51WSNmqa scasfCW8sPrpkV2dyhdcrN8FBLYeqzbhN7bASIZdHSCT4wfVaQgjOcL/AZ10yvIDo1d0 8iKXLVu6Xk4g/c62Ezv+349CusBgZ6VCeEJs4fASxaUYwHhc2QQVM0ORGUtq1nXqLSoN CNKDIa1TY0jlz9y9JoML2FSI1iARzxjG4pg6N4QSclro/5ylS31UY9vIfxPGp6eOpKD6 iVOa9rb/OTvhGvv0jFbKyteytUUsBNEjUWboztdT2PnkNxHBIKCnult2BO5FjecgcDFd 5qSQ== MIME-Version: 1.0 X-Received: by 10.180.211.212 with SMTP id ne20mr20002427wic.31.1386693684401; Tue, 10 Dec 2013 08:41:24 -0800 (PST) In-Reply-To: References: Date: Tue, 10 Dec 2013 08:41:24 -0800 Subject: Re: Trouble with Multi-threading From: Dan Stromberg To: dan.rose@parker.com Content-Type: multipart/alternative; boundary=001a11c38a88789abb04ed30c83f Cc: Python List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 78 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386693686 news.xs4all.nl 2963 [2001:888:2000:d::a6]:47809 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61481 --001a11c38a88789abb04ed30c83f Content-Type: text/plain; charset=ISO-8859-1 On Tue, Dec 10, 2013 at 8:21 AM, 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). > > 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. > > Now, when I go to run this same program (no changes to the program), I am > getting this message: > > 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 > ================================ > >>> > > >>> > > I look in Task Manager and I don't see any threads for PYTHON. > It looks to me like you may be using multiprocessing rather than multithreading... Multiprocessing uses multiple processes with shared memory. Multithreading uses multiple Program Counter's in the same process. --001a11c38a88789abb04ed30c83f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

= On Tue, Dec 10, 2013 at 8:21 AM, <dan.rose@parker.com> wr= ote:
I am running PYTHON 2.7.3 and executing a PYTHON program that uses multi-threading. =A0I am running this on a 64-bit Windows 2008 R2 server (Service Pack 1).

Three months ago, I was able to execute this program just fine. =A0I ran the program and opened Task Manager and verified that the program successfully obtained all of the multiple threads it requested.

Now, when I go to run this same program (no changes to the program), I am getting this message:

Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits&quo= t; or "license()" for more information.
>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RESTART =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>>
<multiprocessing.queues.Queue object at 0x00000000042309E8>
>>>

I look in Task Manager and I don't see any threads for PYTHON.

It looks to me like you may be using m= ultiprocessing rather than multithreading...

Multiprocess= ing uses multiple processes with shared memory.=A0 Multithreading uses mult= iple Program Counter's in the same process.
=A0
--001a11c38a88789abb04ed30c83f--