def prepareTask[T, U, Req, Rep](task: GenericTask[T, U, Req, Rep], ctx: TaskContextImpl[T, U, Req, Rep]): GenericTask[T, U, Req, Rep]
Prepare a task behavior at runtime.
Prepare a task behavior at runtime.
This executes the initialization and returns the initialized task. This needs to be called internally to initialize the task behavior before execution.
Value parameters
ctx
task context
task
task to be prepared
Attributes
Returns
prepared task
def run_and_cleanup_reply[T, U, Req, Rep](id: Int, r: Rep)(using actx: TaskContextImpl[T, U, Req, Rep]): Unit
Run the continuation id with the reply r.
Run the continuation id with the reply r.
This is used to run the continuation of a reply. The continuation is stored in the task context and is run via this method when the reply is received. This completes the future.