[Stackless] threading.Lock() Doesn't Work

seun.osewa at gmail.com seun.osewa at gmail.com
Wed Jun 13 14:39:10 CEST 2007

Hello Richard,

Unfortunately (or fortunately) you are right.  It has nothing to do
with Stackless - or Python.  I mistakenly saved a file as
threading.py, but even after I removed the .py file, Python continued
to load the compiled .pyc file instead of the one in the standard
library.  I didn't notice the threading.pyc file until much later when
I was prompted to check it again.

Very sorry I am, about this mix-up.

On 6/13/07, Richard Tew <richard.m.tew at gmail.com> wrote:
> On 6/12/07, Seun Osewa <seun.osewa at gmail.com> wrote:
> > I'm facing a very puzzling problem.  Each time I try to run any
> > multi-threaded program on my Stackless Python (windows) 2.5.1 I get an
> > error.
> >
> > In file \lib\Queue.py, "self.mutex=threading.Lock()"
> > AttributeError: 'module' object has no attribute 'Lock'
> >
> > If I run the same scripts with -O, they run, but a script that Depends
> > on the Queue class causes Python to hang.  I'm wondering if some bad
> > interaction between Python and Stackless is causing this?
> Hi Seun,
> Some questions:
>  1. Is there any chance you can provide the simplest possible
> reproduction case you can come up with?
>  2. Are you using the prebuilt binaries from stackless.com or did you
> compile Stackless yourself?
> I assumed that if Lock was not available the following would fail (I
> did it in the Python interpreter):
>      >>> import threading
>      >>> threading.Lock
>      <built-in function allocate_lock>
>      >>>
> Do this fail for you?  If it does then unfortunately the problem is on
> your end.  I suspect this is the case, otherwise there would have been
> indications of wider problems in the test suite when I ran it after I
> compiled the binaries.
> Cheers,
> Richard.

Seun Osewa
http://www.nairaland.com [vast Nigerian forum]

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list