3 ms·
You cant really do that in ES6.You'd have to use a co-routine framework (and a "thunkifier") and a generator that would yield some stuff. something like co
by aikah 12y ago
You cant really do that in ES6.You'd have to use a co-routine framework (and a "thunkifier") and a generator that would yield some stuff.
something like
co(function *(){
for(i in uids){
users[i] = yield thunkify(load_users)(uids[i]);
}
});
While generators are useful, they dont make async code look like sync code.