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

[ENHANCEMENT] Async-await start to return result #553

Open
MoridinBG opened this issue May 29, 2024 · 1 comment
Open

[ENHANCEMENT] Async-await start to return result #553

MoridinBG opened this issue May 29, 2024 · 1 comment
Labels
acknowledged enhancement New feature or request

Comments

@MoridinBG
Copy link

Description

Currently the async-await start implementation is a wrapper for the asynchronous completion handler start function. It resumes when the data file is downloaded, but discards the file data.
A simple change would be to make start return Data and replace

case .success:
    continuation.resume()

with

case .success(let datafile):
    continuation.resume(returning: datafile)

Benefits

This will simplify SDK usage in modern Swift code

Detail

No response

Examples

No response

Risks/Downsides

No response

@MoridinBG MoridinBG added the enhancement New feature or request label May 29, 2024
@muzahidul-opti
Copy link
Contributor

@MoridinBG thanks for your feedback. We will review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants