-
Notifications
You must be signed in to change notification settings - Fork 12
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
move all work to main thread with serial executor #225
Conversation
@@ -1241,13 +1262,13 @@ extension TestStore where ScopedState: Equatable, Action: Equatable { | |||
/// expected. | |||
@MainActor | |||
@_disfavoredOverload | |||
func receive( | |||
func receive( |
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.
hmm will fix this
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.
Nit: for consistency, could we re-indent whole file with 4 spaces instead of 2? Select all (Command-A), then re-indent (Control-i)
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.
Yah I thought we had that set somewhere in the linting but maybe never enforced anything...
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.
That might make the diff hard to read.
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.
ahh good point
if uncheckedUseMainSerialExecutor { | ||
await Task.yield() | ||
} else { | ||
await self.reducer.effectDidSubscribe.stream.first(where: { _ in true }) |
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.
This is different in TCA - might backport that change too..
@@ -1241,13 +1262,13 @@ extension TestStore where ScopedState: Equatable, Action: Equatable { | |||
/// expected. | |||
@MainActor | |||
@_disfavoredOverload | |||
func receive( | |||
func receive( |
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.
Nit: for consistency, could we re-indent whole file with 4 spaces instead of 2? Select all (Command-A), then re-indent (Control-i)
Description
This backports some stuff from the new test store from TCA.
This should move all store tests effects to the main thread.
Check List
Manual Test Plan
Supporting Materials