[Stackless] stackless inter-thread queues

Paul Sijben sijben at eemvalley.com
Sat Mar 14 17:02:50 CET 2009



Richard Tew wrote:
> On Sat, Mar 14, 2009 at 6:49 AM, Paul Sijben <sijben at eemvalley.com> wrote:
>   
>> 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.
>>     
>
> 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.
>   

well, sometimes channel.receive gives me None while nothing was put in.

> What sticks out to me in your post, is that you say:
>   
>> 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.
>>     
>
> Is this the real problem? 
ah, well, with an intermittent scheduling problem one never knows ;-)

>  Can't you solve this?
>   
> There's a queue inplementation in the uthread module:
> http://code.google.com/p/stacklessexamples/source/browse/trunk/libraries/uthread-ccp/uthread.py
>
>   
I'll try that one, thanks

> Cheers,
> Richard.
>
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless
>   

-- 
Paul Sijben                    	        tel: +31334566488
Eemvalley Technology     		fax: +31334557523
the Netherlands                   	http://eemvalley.com    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20090314/478c3efd/attachment.htm>


More information about the Stackless mailing list