Posted to tcl by colin at Mon May 31 00:50:12 GMT 2010view pretty

proc c {} {
    yield
    error "This will explode"
}

proc cc {} {
    coroutine C c	;# C is created, and contains cc's stack
}

proc boom {} {
    cc
    C	;# C still references the now-defunct cc stack
}

boom