You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • It's nice to see the job getting done... for the price of 5 globals... not bad.

    Reduce the 5 to 1 in the spirit of object-orientation helps with clean-up and passing the one as parm to the sequence defining application functions (async1..4) would conribute to hardening.

    I liked the naming in Kazimir's original post: queue... and that it is: queing of sets of asynch operations that have to complete one after the other before a next set is allowed to be entered, and finally chaining these sets.

    In some of my implementatins I needed result-dependent follow-up async operation(s) to be completed before the next set could be entered, and therefore allowed an insertion into or append to the funcs array. The effect is similar to a pseudo-multi-level / quasi-context creation (easy to implement by enhancing the next() to accept optionally the required parameters to do it).

    Surfing the subject shows many implementations with various focus.

    @JumJum, what is the obj's purpose in line 46? Espruino is reporting it undefined...

About

Avatar for allObjects @allObjects started