[Stackless] Stackless and Pyrex efficiently

Péter Szabó ptspts+stackless at gmail.com
Wed Jan 27 18:14:18 CET 2010

> If you are doing tasklet switching from C, there is no avoiding the hard switching.

Thanks for this information. I'd be happy with a custom hack like this:

def Wake(self):    # defined in Python (or C)
  print 'Wake'

void MyCFunction() {
  // This will discard the bottommost C stack, and it will call Wake
as soon as the tasklet is rescheduled.
  PyStackless_ScheduleAndContinueWith(None, 1, Wake)

More information about the Stackless mailing list