We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fd7f32 commit b9f6e38Copy full SHA for b9f6e38
Sources/ComposableArchitecture/TestStore.swift
@@ -576,7 +576,9 @@
576
if "\(self.file)" == "\(file)" {
577
self.line = line
578
}
579
- await Task.megaYield()
+ // NB: Give concurrency runtime more time to kick off effects so users don't need to manually
580
+ // instrument their effects.
581
+ await Task.megaYield(count: 20)
582
return .init(rawValue: task, timeout: self.timeout)
583
584
@@ -1044,7 +1046,7 @@
1044
1046
1045
1047
1048
extension Task where Success == Never, Failure == Never {
- static func megaYield(count: Int = 6) async {
1049
+ static func megaYield(count: Int = 10) async {
1050
for _ in 1...count {
1051
await Task<Void, Never>.detached(priority: .low) { await Task.yield() }.value
1052
0 commit comments