Skip to content

Commit 1ae306c

Browse files
mbrandonwmluisbrown
authored andcommitted
Update threading messaging. (#789)
1 parent 1ae7eac commit 1ae306c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/ComposableArchitecture/Store.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,20 +451,20 @@ public final class Store<State, Action> {
451451
message = """
452452
An effect returned from the action "\(debugCaseOutput(action))" completed on the \
453453
wrong thread. Make sure to use ".receive(on:)" on any effects that execute on background \
454-
threads to receive their output on the initial thread.
454+
threads to receive their output on the same thread the store was created on.
455455
"""
456456

457457
case let .send(action, isFromViewStore: true):
458458
message = """
459459
"ViewStore.send(\(debugCaseOutput(action)))" was called on the wrong thread. Make \
460-
sure that "ViewStore.send" is always called on the initial thread.
460+
sure that "ViewStore.send" is always called on the same thread the store was created on.
461461
"""
462462

463463
case let .send(action, isFromViewStore: false):
464464
message = """
465465
An effect emitted the action "\(debugCaseOutput(action))" from the wrong thread. Make sure \
466466
to use ".receive(on:)" on any effects that execute on background threads to receive their \
467-
output on the initial thread.
467+
output on the same thread the store was created on.
468468
"""
469469
}
470470

@@ -478,8 +478,8 @@ public final class Store<State, Action> {
478478
479479
\(message)
480480
481-
Initial thread: \(self.initialThread)
482-
Current thread: \(Thread.current)
481+
Store created on: \(self.initialThread)
482+
Action sent on: \(Thread.current)
483483
484484
The "Store" class is not thread-safe, and so all interactions with an instance of "Store" \
485485
(including all of its scopes and derived view stores) must be done on the same thread.

0 commit comments

Comments
 (0)