[Stackless] Problems with Queues in Microthread Lib.
Bernd Rinn
Bernd.Rinn at epost.de
Fri Mar 16 16:24:27 CET 2001
On Fri, Mar 16, 2001 at 07:25:17AM -0800, James Turner wrote:
> Hi all,
>
> For some strange reason I can\'t figure out to make
> queues work correctly for me. This is the code I\'m
> testing with:
> [...]
> Ack! I thought at first that get() was just not
> blocking for me, but now it appears that it\'s quitting
> the microthread entirely for some reason!
>
> If it\'s any help at all, mqueue.cget() will read None
> and the microthread will carry out its normal lifespan.
I can confirm the bug is present with Python 2.0.42-S1.2.22 on Linux2.
When
request_queue.put(1)
request_queue.put(2)
is added _before_ uthread.run() is called, everything seems OK. If the
put's are given _after_ uthread.run(), I get the error
==================================================================
~/tmp $ python ttt.py
Somehow I get here...
Somehow I get here...
Traceback (most recent call last):
File "ttt.py", line 15, in ?
request_queue.put(1)
File "/usr/lib/python2.0/uthread.py", line 470, in put
atomic(self.__put, x)
File "/usr/lib/python2.0/uthread.py", line 169, in atomic
return apply(func, args, kwargs)
File "/usr/lib/python2.0/uthread.py", line 474, in __put
self.notify()
File "/usr/lib/python2.0/uthread.py", line 257, in notify
atomic(self.__notify)
File "/usr/lib/python2.0/uthread.py", line 169, in atomic
return apply(func, args, kwargs)
File "/usr/lib/python2.0/uthread.py", line 262, in __notify
th.start()
File "/usr/lib/python2.0/uthread.py", line 687, in start
atomic(self.__start, task, scheduler)
File "/usr/lib/python2.0/uthread.py", line 169, in atomic
return apply(func, args, kwargs)
File "/usr/lib/python2.0/uthread.py", line 697, in __start
raise UThreadError, ERR_THREAD_DEAD
uthread.UThreadError: Can't restart a finished thread.
==================================================================
Regards,
Bernd
--
Bernd Rinn
Fakultät für Physik
Universität Konstanz
Tel. 07531/88-3812,
e-mail: Bernd.Rinn at uni-konstanz.de
PGP-Fingerprint: 1F AC 31 64 FF EF A9 67 6E 0D 4C 26 0B E7 ED 5C
_______________________________________________
Stackless mailing list
Stackless at starship.python.net
http://starship.python.net/mailman/listinfo/stackless
More information about the Stackless
mailing list