23 Sep 2005 14:59
RE: Announcing RIFE/continuations, pure Java continuations for everyone
>> Geert,
>> Sorry. Wasn't very explicit. We have a simulation framework that
>> consists of an executive and a bunch of logical processes
(simulation
>> entities). The logical processes perform cooperative multi-tasking,
>> which means this: A logical process runs until it wants to wait for
>> simulation time to pass. It asks the executive to suspend its
>> execution. The executive decides on another logical process to run,
>> and
>> resumes that process's execution at the point where it had stopped.
>> Eventually that process gives up running and asks the executive to
>> suspend it. So at any point either the executive is choosing
>a logical
>> process to run, or some process is running. All the other logical
>> processes are suspended. Their suspended state could be
>represented by
>> a suitable continuation. A process never has more than one
>> continuation
>> at a time, nor does a continuation need to be resumed more than
once.
>>
>
>You mean something like this?
>
> final Continuation continuation = Continuation.startWith(new
>Runnable() {
> public void run() {
> // calculate
(Continue reading)
RSS Feed