异步模型:上下文与时间---async = request + reponse + handler + context + time;

futureHandler = current(handler, context(t0)) : T0    ->    handler(context(t0),taskResult) : Tx

T0:request(params, handler, context(0));

Tn:hander(response, context(0))

 

context = 当前能够访问到的环境变量 + 作用环境中的后继操作。

 

将作用域内{}后继未执行的操作作为上下文打包;

相当于函数调用时,将调用函数的上下文通过栈帧保存一样;

 

async = request + reponse + handler + context + time;

posted @ 2019-07-18 11:34  zzfx  阅读(148)  评论(0编辑  收藏  举报