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

Misc: remove usage of blocking methods #1563 #1565

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

ganfra
Copy link
Contributor

@ganfra ganfra commented Oct 13, 2023

Closes #1563

If everything works properly then we can merge matrix-org/matrix-rust-sdk#2715

@ganfra ganfra marked this pull request as ready for review October 13, 2023 09:07
@ganfra ganfra requested a review from a team as a code owner October 13, 2023 09:07
@ganfra ganfra requested review from julioromano and removed request for a team October 13, 2023 09:07
@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/CU1C9x

Copy link
Contributor

@julioromano julioromano left a comment

Choose a reason for hiding this comment

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

LGTM, I've seen you've removed all dispatcher and withContext stuff.
Does this mean uniffi will now take care of running the work on the most appropriate thread?
Or does this mean the dispatcher to use will still come from the calling code (i.e. the app's coroutine context) ?
Or... else? :D

@ganfra
Copy link
Contributor Author

ganfra commented Oct 13, 2023

LGTM, I've seen you've removed all dispatcher and withContext stuff. Does this mean uniffi will now take care of running the work on the most appropriate thread? Or does this mean the dispatcher to use will still come from the calling code (i.e. the app's coroutine context) ? Or... else? :D

There is no need to dispatch anymore as those methods are now truly suspending. But we still have non suspending methods in the codebase, to wrap with withContext

@ganfra ganfra force-pushed the feature/fga/remove_rust_blocking_methods branch from d4658e0 to 76bbe4d Compare October 13, 2023 10:17
@ganfra ganfra enabled auto-merge October 13, 2023 10:18
@sonarcloud
Copy link

sonarcloud bot commented Oct 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ganfra ganfra merged commit 0ef449f into develop Oct 13, 2023
13 checks passed
@ganfra ganfra deleted the feature/fga/remove_rust_blocking_methods branch October 13, 2023 10:38
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.

[Rust sdk] Remove usage of blocking methods
2 participants