delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/23/15:34:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 23 Dec 2004 15:36:32 -0500
From: Jason Tishler <jason AT tishler DOT net>
To: cygwin AT cygwin DOT com
Subject: Re: cygwin python thread support
Message-ID: <20041223203632.GB3164@tishler.net>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <41CA071B DOT 2060503 AT arbash-meinel DOT com>
Mime-Version: 1.0
In-Reply-To: <41CA071B.2060503@arbash-meinel.com>
User-Agent: Mutt/1.4.1i
X-IsSubscribed: yes

--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

John,

On Wed, Dec 22, 2004 at 05:45:31PM -0600, John A Meinel wrote:
> I'm working on a project that is using python with threads and
> readline.  As near as I can figure out, the default cygwin python has
> threads disabled. I've tried to do some searching about why, but the
> best I can find is this:
> http://sources.redhat.com/ml/cygwin/2001-09/msg01607.html
> 
> Which is dated from 2001 and says that the reason threading is
> disabled is because the cygwin pthreads library was not very solid.
> I'm not sure if that is still the case, but I know *I've* used
> pthreads on windows, and have been quite happy with it.

The Cygwin Python README states the following:

    As of Cygwin Python 2.2.1-1, the port supports threading.  Many
    thanks to Rob Collins (and others) who enhanced Cygwin's pthreads
    support to the level needed by Python.

So, Cygwin Python has supported threading since 6/25/2002:

    http://cygwin.com/ml/cygwin-announce/2002-06/msg00019.html

> Are there still problems with threading and python on cygwin, or has
> it just never been updated? Or am I missing something completely?

However, there are some occasional Cygwin Python thread hang problems on
Hyperthreaded Pentium 4 processors.  Search the archives, if interested.

> I would switch to the native win32 python version, but then I don't
> have readline, which is one of the fundamental reasons to use this
> project.

One can build readline for Win32 Python.  See the attach for a setup.py
that should get you started.  Sorry, that it is not quite ready for
public consumption...

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="setup.py"

from distutils.core import setup, Extension

python_root = '/home/jt/src/PythonCvs'
python_modules = python_root + '/' + 'Modules'
mingw_root = '/misc/mingw'
mingw_include = mingw_root + '/' + 'include'
mingw_lib = mingw_root + '/' + 'lib'

setup(
    name = 'readline',
    version = '4.2',
    ext_modules = [
        Extension(
            'readline',
            [python_modules + '/' + 'readline.c'],
            include_dirs = [mingw_include],
            define_macros = [('__READLINE_IMPORT__', None)],
            library_dirs = [mingw_lib],
            libraries = ['readline'])])


--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--5mCyUwZo2JvN/JJP--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019