-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New async.sync like async.apply for sync functions. #671
Comments
👍 for the idea. I end up writing this function all the time. Needs a try/catch to handle any possible errors, though. And the final name probably needs some bikeshedding. |
Thanks @aearly! I think the general reaction is that the whole point is that we should be only worrying about async functions. I think this is good for flow-control keeping async functions plug-and-play. It really depends on your philosophy, and there may be a bigger divide there. |
I've added |
And ideas for what to name this?
|
@aearly From my example above, I personally like like |
I'm not a fan of Whats your second choice? 😄 |
@aearly Makes sense. I like |
I came up with an
async.sync
call that's likeasync.apply
except for synchronous functions. Checkout the bottom example that usespath.join
async.sync(path.join, "/hello", "world", "awesome")
.The text was updated successfully, but these errors were encountered: