异步模型:上下文与时间---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;

猜你喜欢

转载自www.cnblogs.com/feng9exe/p/11206207.html