You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i don't get the section on non-blocking code. You say a must complete it's task before it calls b -- to me, that sounds like a is blocking b. I thought asynchronous means two threads of code, a and b, getting executing simultaneously, not first a, then b. Or that b can begin before a is finished. -thx
The text was updated successfully, but these errors were encountered:
I think this section needs some work. The only reason this is non-blocking is because a() calls another function download that defines a function with the callback to b(). The description however implies you could define a() simply as:
function a(done) {
done();
};
and execution would be asynchronous.
However, if a() were defined this way and you called functions:
a(b);
c();
then c() wouldn't get called until b() finished inside of a(), and a() would block c()'s execution after all.
Hi, i don't get the section on non-blocking code. You say a must complete it's task before it calls b -- to me, that sounds like a is blocking b. I thought asynchronous means two threads of code, a and b, getting executing simultaneously, not first a, then b. Or that b can begin before a is finished. -thx
The text was updated successfully, but these errors were encountered: