[Stackless] Explicit yield/break to Preemptive Stackless Loop

Richard Tew richard.m.tew at gmail.com
Thu Nov 9 12:50:16 CET 2006


On 11/4/06, Brian Hardie <bhardie at cs.usfca.edu> wrote:
> schedule_task_block(PyTaskletObject *prev, int stackless)
> {
>     ...
>     if (check_for_deadlock()) {
>        /*revive real main if floating */
>        if (ts == slp_initial_tstate && ts->st.main->next == NULL) {
>           /* emulate old revive main behavior:
>            * passing a value only if it is an exception
> ...
>
> I think the expression 'ts == slp_initial_tstate' is checking to see if
> we are running within the main thread.  If so, it recovers the main
> tasklet.  My tasklets are not run by the main thread; perhaps this has
> been a problem.

What say you, Jeff and Christian?  There is no reason we shouldn't just
remove this slp_initial_tstate check, right?

Richard.

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list