VG
Size: a a a
VG
АК
VG
VG
АК
VG
We have two calls that are similar as far as users are concerned, but their names are confusing.
* process.nextTick() fires immediately on the same phase
* setImmediate() fires on the following iteration or 'tick' of the event loop
In essence, the names should be swapped. process.nextTick() fires more immediately than setImmediate(),
-- ахахаха! и вот так у них в JS ВСЁАК
function f_one(){Вернее, f_one лучше записать вот так:
setTimeout(f_one,1);
};
async function f_two(){
await f_promise();
f_two();
};
function f_promise(){
return new Promise(function(ok){
setTimeout(ok,1);
}
};
function f_one(){
setTimeout(function(){
f_one();
},1);
};
VG
VG
function f_one(){Вернее, f_one лучше записать вот так:
setTimeout(f_one,1);
};
async function f_two(){
await f_promise();
f_two();
};
function f_promise(){
return new Promise(function(ok){
setTimeout(ok,1);
}
};
function f_one(){
setTimeout(function(){
f_one();
},1);
};
VG
АК
АК
АК
VG
while (!now_it_time_to_go_home) { // dinner_time в Почте Россиивполне себе таки луп
select(read_set, write_set, NULL, timeout);
gettimeofday(...);
// process descriptors and timers, call callbacks
}
АК
VG
АК
VG
VG