[bitc-dev] BitC, Irken, CPS
Sandro Magi
naasking at higherlogics.com
Fri Feb 6 21:21:54 EST 2009
Jonathan S. Shapiro wrote:
>> generators
>
> What do you mean by "generators"?
He means asymmetric coroutines, such as what Python and C# support. See
Microsoft's "Concurrency and Coordination Runtime" for an example of
using generators to implement a lightweight concurrency framework.
Basically, you have a scheduler which executes generators producing
"asynchronous values". When the generator yields an "asynchronous value"
generated by a blocking call, the scheduler blocks the generator on the
value until it resolves, then resumes the generator.
It's basically a process model without the need for stacks, so you enjoy
the structure of a sequential program, but with the benefits of
asynchronous execution.
Sandro
More information about the bitc-dev
mailing list