Can I be sure that the Trulu log call will never be called before the call to async.parallel is finished?
The call itself, yes.
In other words, are all the functions
I guess so, though the docs don't mention it. I would however expect no changes, since that is likely to break existing code.
and the final callback called before the Trulu log is called for sure?
No. You don't know the functions, and when they are asynchronous then the final callback will execute after Trulu
. If all the functions are synchronous, you shouldn't use async
anyway. Indeed, while async.js does use setImmediate
internally so some callbacks (unfortunately hard to identify) will be "asynchronified", yet the maintainer stated:
Yes, making functions asynchronous is left up to the developer
If you want to ensure that callbacks are always called asynchronously (after Trulu
), even when the functions are synchronous, you might consider using A+ compliant Promises.