You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Your terminology sounds fine to me! A promise chain itself is not blocking but in JavaScript the execution of function code is (unless you declare it 'async' which Espruino doesn't support - but all that does it effectively split the function into a bunch of smaller sync functions joined with promises).

    So Espruino can only run one bit of code at a time (it's not pre-emptive), but by splitting the code up and calling the next bit of code from a promise/callback it can then interleave those smaller bits of code and make it seem multi-tasking.

    So in your case as you noted I think maybe one part of the promise is just taking a long time to finish?

About

Avatar for Gordon @Gordon started