Attached.
Note that this is not very well tested and may be completely bogus.

From: [email protected] [mailto:[email protected]] 
On Behalf Of piyush singhai
Sent: 1. mars 2012 14:04
To: The Stackless Python Mailing List
Subject: Re: [Stackless] tasklet time out

Yes Please post the code i will be very thankful to you.
On Thu, Mar 1, 2012 at 4:35 PM, Kristján Valur Jónsson 
<[email protected]<mailto:[email protected]>> wrote:
This has come up over here.  We have been thining, for example, that tasklets 
should be able themselves to break out of "run", withough the currently hacky 
way of stackless.main.run()
Also, some sort of "break" callback which can be called regularly to see if we 
ought to break, rather than rely on this weird "instruction count" thingie.

In fact, with some slight modifications to stackless, it ought to be possible 
to write your own scheduler in a simple way. (The problem is that tasklet.run() 
leaves the caller runnable.  Something like tasklet.run(remove=true) would be 
helpful as an atomic switching operation, allowing one to write one's own 
scheduler.)

I wrote something like this once, can post the source if anyone is interested.



Attachment: scheduler.py
Description: scheduler.py

_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to