This is nice on the browser, but not very useful in nodeJS.
twait{} will block and stop my nodeJS process from doing anything else.
It would be more useful if I could give twait{} a callback to fire when all its async events completed. Then my nodeJS process could do other stuff while waiting for a twait{} bundle to finish.
Isn't it waiting to execute anything that follows after a twait code block?
If so, then it is blocking. Otherwise, how do you manage to let other code be executed, except the code you don't want to be executed until all functions in the twait block have returned?
The would need to be a callback attached to the twait block, but there isn't. So it's blocking.
Because that is it's purpose, to block further executing until all data from the non-blocking functions have returned.
twait{} will block and stop my nodeJS process from doing anything else.
It would be more useful if I could give twait{} a callback to fire when all its async events completed. Then my nodeJS process could do other stuff while waiting for a twait{} bundle to finish.