Meteor._wrapAsync allows us to wrap an asynchronous function so we can call it in a synchronous style. It does this without sacrificing the performance benefits of IO related asynchronous functions by using Fibers and Meteor.bindEnvironment. In this video I'll review what it means to be asynchronous by diagraming the event loop. Then we'll use Meteor._wrapAsync to wrap an asynchronous function. Finally, I give some examples of where Meteor._wrapAsync is used in Core, and how you can use it with third party libraries.
One-On-One Questions or Comments?
Something not making sense, want to share your thoughts or just say hello? I check this daily!