well, promise is also async; and there are some guaranteed order in async
operations:
async_fn_with_cb(function() {
// this MUST come after the below line
f();
});
// this MUST come before the above line
f();
【 在 wei507166 (robot-no.9527) 的大作中提到: 】
: 用promise吧,回调是异步的,不能保证执行顺序。
: 调用的回调函数里,t1已经被赋值了,但是出了这个函数,t1还是空的。
--
FROM 183.195.251.*