Skip to content
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

create an ergnonmic sync api #7

Open
xmclark opened this issue Jun 11, 2019 · 0 comments
Open

create an ergnonmic sync api #7

xmclark opened this issue Jun 11, 2019 · 0 comments

Comments

@xmclark
Copy link
Collaborator

xmclark commented Jun 11, 2019

I'm fond of node.js's strategy for sync and async APIs. They maintain two copies of a function: one that is sync and one that is not (async). I have not seen this pattern in Rust, but I'm sure it could be ported.

This allows a user to not worry about futures, runtime or "wait"ing. A lot of times, you just want to block, especially for simpler apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant