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 sync utils function to make async calls sync #369

Merged
merged 6 commits into from
Sep 13, 2020
Merged

Create sync utils function to make async calls sync #369

merged 6 commits into from
Sep 13, 2020

Conversation

f-meloni
Copy link
Member

@f-meloni f-meloni commented Sep 8, 2020

No description provided.

@orta
Copy link
Member

orta commented Sep 8, 2020

is await likely to be coming to the Swift language? Might be worth naming your function something else if so


/// Converts an asynchronous function to synchronous.
///
/// - Parameter body: The async function must be called inside this body and closure provided as parameter must be executed on completion

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Line should be 120 characters or less: currently 141 characters (line_length)

@f-meloni
Copy link
Member Author

f-meloni commented Sep 8, 2020

@orta this is a really good call, there is a proposal for await (https://gist.github.com/lattner/429b9070918248274f25b714dcfc7619), then is possible it becomes part of the language at one point.
Then I think it might make sense to rename it, thank you for the suggestion.

@f-meloni f-meloni changed the title Create await utils function to make async calls sync Create sync utils function to make async calls sync Sep 12, 2020
@f-meloni f-meloni merged commit 8417392 into master Sep 13, 2020
@f-meloni f-meloni deleted the await branch September 13, 2020 20:03
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

Successfully merging this pull request may close these issues.

None yet

3 participants