GIL in the new glossary

Dave Kuhlman dkuhlman at rexx.com
Fri Oct 3 22:27:44 EDT 2003


Peter Hansen wrote:

> Andrew Dalke wrote:
>> 
>> The select loop is single threaded.  Twisted supports
>> multithreading, but it isn't required that you use it.  That
>> multithreading code has the same limitations as Python,
>> because Python is almost pure Python code.
>           ^^^^^^
> You mean Twisted, of course.
> 
> And I think the "almost" is wrong: it's 100% pure Python.
> 
> At least, I took the directory tree from my Windows machine and
> copied it to a Linux box, rather than dig up a Twisted .tgz to
> put on Linux, and everything that *I* was using ran fine.  And
> I think the "Twistedistas"** say from time to time that it is pure
> Python, without qualification.

>From within Twisted-1.0.8alpha3, I did:

    $ find * -iname '*.c'
    sandbox/exarkun/digtest/digcalc.c
    sandbox/exarkun/digtest/digtest.c
    sandbox/exarkun/digtest/md5.c
    sandbox/exarkun/digtest/mdriver.c
    sandbox/exarkun/iovec.c
    twisted/internet/cReactor/cDelayedCall.c
    twisted/internet/cReactor/cReactor.c
    twisted/internet/cReactor/cReactorBuffer.c
    twisted/internet/cReactor/cReactorModule.c
    twisted/internet/cReactor/cReactorTCP.c
    twisted/internet/cReactor/cReactorThread.c
    twisted/internet/cReactor/cReactorTime.c
    twisted/internet/cReactor/cReactorTransport.c
    twisted/internet/cReactor/cReactorUtil.c
    twisted/internet/cReactor/cSystemEvent.c
    twisted/protocols/_c_urlarg.c
    twisted/python/_c_dir.c
    twisted/runner/portmap.c
    twisted/spread/cBanana.c

But, I don't think that's the issue that Andrew and others in this
thread are trying to focus on.  Or is it?  Isn't what matters is
whether Twisted does enough processing where it gives up control
during the execution of C/C++ code so that other processes and
processors can also do work in parallel?  I suppose I'd better ask
this question over on the Twisted-users list.  Although, their
oppinions might be just a little biased.

> 
> -Peter
> 
> ** Okay, what's the equivalent to Pythonista for a Twisted, uh,
> person?

Or, perhaps a Twisted person is just, uh, twisted.

Dave

-- 
Dave Kuhlman
http://www.rexx.com/~dkuhlman
dkuhlman at rexx.com




More information about the Python-list mailing list