Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add progress callback to asynchronousasync await initialiser for Realm#8034

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
dianaafanador3 wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromdp/async_open_with_progress

Conversation

@dianaafanador3
Copy link
Contributor

This is extending the API forRealm.init() async to have a callback for progress notifications. Feature request here#7763.

@cla-botcla-botbot added the cla: yes labelNov 16, 2022
case.always:
rlmRealm=tryawaitwithCheckedThrowingContinuation{ continuationin
RLMRealm.asyncOpen(with: configuration.rlmConfiguration, callbackQueue:.main){(realm, error)in
letrlmTask=RLMRealm.asyncOpen(with: configuration.rlmConfiguration, callbackQueue:.main){(realm, error)in

Choose a reason for hiding this comment

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

Hey@dianaafanador3 thanks for the PR. Looking good.

What was your reasoning for fixing the callbackQueue to.main rather than letting an implementer pass in their preffered queue?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Because you can only runlet realm = try await Realm() at the moment, in a@mainactor.
We are still discussing if this is the bet API for this, but we have a project in progress which should give better support for actor-confined Realms and offer a better experience with Swift concurrency in general, which should include exposing recurring callbacks asAsyncSequences for sync progress notification.

Choose a reason for hiding this comment

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

That's great, thanks@dianaafanador3

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@rowungilesrowungilesrowungiles left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@dianaafanador3@rowungiles

[8]ページ先頭

©2009-2025 Movatter.jp