Yes, I think I have done similar work with libevent stackless and Pyrex for Concurrence (http://opensource.hyves.org/concurrence/)
I have taken much care to never ever call back from C into Python explicitly to prevent hard switching. One of the things I did was to heavily modify pyevent to not raise IO event trough callbacks into python. grtz, Henk On Tue, Jan 26, 2010 at 7:20 PM, Andrew Francis <[email protected]> wrote: > Hi Peter: > >>I'm planning to reimplement some of my Stackless I/O buffering + >>read(2) + write(2) code in Pyrex. Is it possible to call >>stackless.schedule_remove() from a Pyrex method (or a C extension >>function)? Is it recommended? How should I make it work most >>efficiently? Is there a recommended alternative? > > I don't know the C extension/Pyrex answer. However I thought Henk > Punt did some similar work with libevent, Stackless, and pyrex? > > http://www.stackless.com/pipermail/stackless/2009-January/003834.html > >>I'd like to translate a function like this to Pyrex: > > Peter, here is something I have wondered about and would like to > test: is it really better to suspend and resume a tasklet when low > level data is available? Or when a high level message is available? > To me the issue revolves around context switches. Intuitively I would > think the later. > > Cheers, > Andrew > > > > > > > > > > > > _______________________________________________ > Stackless mailing list > [email protected] > http://www.stackless.com/mailman/listinfo/stackless > _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
