-
Notifications
You must be signed in to change notification settings - Fork 731
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
Convert IdentityService to suspend functions #3069
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the PR.
Just one question about the usage of withContext
(but maybe out of scope of this PR)
Benoit
} | ||
|
||
return taskExecutor.executorScope.launchToCallback(coroutineDispatchers.main, callback) { | ||
withContext(coroutineDispatchers.main) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if this is necessary to keep the withContext()
call here (and for other methods too). WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was thinking about this. We can (and should) drop the withContext
here.
To keep things simple I left it in, to mostly preserve previous behaviour.
Once all the callbacks have been converted and everything is consistently marked as suspend
, I was planning to review all the uses of withContext
and remove the unnecessary ones.
Although....... most of these have been pretty simple so far but I only realized that after like the 9th PR, by which point it was too late 😂.
We can just remove them; I'm at work right now so I can do so in the evening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
Signed-off-by: Dominic Fischer <[email protected]>
e9735dd
to
501b870
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the update. But please next time add new commits, because I had to review the whole code again since you did a squash and force push including the previous changes.
Will do that next time. 👍 |
Signed-off-by: Dominic Fischer [email protected]
Pull Request Checklist