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 7940588 commit 95cc28aCopy full SHA for 95cc28a
Sources/ComposableArchitecture/TestStore.swift
@@ -573,7 +573,9 @@
573
if "\(self.file)" == "\(file)" {
574
self.line = line
575
}
576
- await Task.megaYield()
+ // NB: Give concurrency runtime more time to kick off effects so users don't need to manually
577
+ // instrument their effects.
578
+ await Task.megaYield(count: 20)
579
return .init(rawValue: task, timeout: self.timeout)
580
581
@@ -1041,7 +1043,7 @@
1041
1043
1042
1044
1045
extension Task where Success == Never, Failure == Never {
- static func megaYield(count: Int = 6) async {
1046
+ static func megaYield(count: Int = 10) async {
1047
for _ in 1...count {
1048
await Task<Void, Never>.detached(priority: .low) { await Task.yield() }.value
1049
0 commit comments