<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Richard Tew wrote:
<blockquote
cite="mid:952d92df0903140605w1c920e7dr48fb61e90b7d195@mail.gmail.com"
type="cite">
<pre wrap="">On Sat, Mar 14, 2009 at 6:49 AM, Paul Sijben <a class="moz-txt-link-rfc2396E" href="mailto:sijben@eemvalley.com"><sijben@eemvalley.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I am banging my head against the wall for far too long now.
For my project, I really (and urgently) need something that will give me
Queue behavior that will work in a mixed stackless & threading
environment. (networking & graphical user interface, a hell scheduling-wise)
I have emulated this in my code but am running into race-conditions.
The problem is that a channel.send() blocks. In my code it sometimes
blocks on the wrong channel and hence starves the tasklet that can
actually keep things going.
So please, does someone have a working stackless Queue that works
interthread? I am at my whit's end here.
</pre>
</blockquote>
<pre wrap=""><!---->
I am not sure what this means. Channels should work interthread, and
a queue would be built on top of channels. So any queue implemented
in such a way should work when used between tasklets on different
threads.
</pre>
</blockquote>
<br>
well, sometimes channel.receive gives me None while nothing was put in.<br>
<br>
<blockquote
cite="mid:952d92df0903140605w1c920e7dr48fb61e90b7d195@mail.gmail.com"
type="cite">
<pre wrap="">
What sticks out to me in your post, is that you say:
</pre>
<blockquote type="cite">
<pre wrap="">The problem is that a channel.send() blocks. In my code it sometimes
blocks on the wrong channel and hence starves the tasklet that can
actually keep things going.
</pre>
</blockquote>
<pre wrap=""><!---->
Is this the real problem? </pre>
</blockquote>
ah, well, with an intermittent scheduling problem one never knows ;-)<br>
<br>
<blockquote
cite="mid:952d92df0903140605w1c920e7dr48fb61e90b7d195@mail.gmail.com"
type="cite">
<pre wrap=""> Can't you solve this?
</pre>
</blockquote>
<blockquote
cite="mid:952d92df0903140605w1c920e7dr48fb61e90b7d195@mail.gmail.com"
type="cite">
<pre wrap="">
There's a queue inplementation in the uthread module:
<a class="moz-txt-link-freetext" href="http://code.google.com/p/stacklessexamples/source/browse/trunk/libraries/uthread-ccp/uthread.py">http://code.google.com/p/stacklessexamples/source/browse/trunk/libraries/uthread-ccp/uthread.py</a>
</pre>
</blockquote>
I'll try that one, thanks <br>
<br>
<blockquote
cite="mid:952d92df0903140605w1c920e7dr48fb61e90b7d195@mail.gmail.com"
type="cite">
<pre wrap="">Cheers,
Richard.
_______________________________________________
Stackless mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Stackless@stackless.com">Stackless@stackless.com</a>
<a class="moz-txt-link-freetext" href="http://www.stackless.com/mailman/listinfo/stackless">http://www.stackless.com/mailman/listinfo/stackless</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Paul Sijben          tel: +31334566488
Eemvalley Technology                 fax: +31334557523
the Netherlands         <a class="moz-txt-link-freetext" href="http://eemvalley.com">http://eemvalley.com</a>
</pre>
</body>
</html>