Continuations and threads (was Re: Iterators & generators)
Neil Schemenauer
nascheme at enme.ucalgary.ca
Thu Feb 17 17:52:01 EST 2000
More information about the Python-list mailing list
Thu Feb 17 17:52:01 EST 2000
- Previous message (by thread): Continuations and threads (was Re: Iterators & generators)
- Next message (by thread): Continuations and threads (was Re: Iterators & generators)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Samuel A. Falvo II <kc5tja at garnet.armored.net> wrote: >OK, that's informative. So much for the differences between threads and >continuations. But I'm still left wondering just what the heck >continuations are. :) Here is my two bit explaination (based on Scheme's call/cc): A continuation is a function which represents the rest of the program. Instead of returning from a function you can call this function giving it one argument which is the return value. These functions are first class just like everything else in Scheme. You can bind them to variables or pass them as arguments. You can also call them more than once passing different "return" values. I hope that doesn't damage the old melon too much. :) Neil
- Previous message (by thread): Continuations and threads (was Re: Iterators & generators)
- Next message (by thread): Continuations and threads (was Re: Iterators & generators)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list