Skip to content

Commit d15101d

Browse files
authored
Update threading messaging. (#789)
1 parent 86bcd08 commit d15101d

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
@@ -431,20 +431,20 @@ public final class Store<State, Action> {
431431
message = """
432432
An effect returned from the action "\(debugCaseOutput(action))" completed on the \
433433
wrong thread. Make sure to use ".receive(on:)" on any effects that execute on background \
434-
threads to receive their output on the initial thread.
434+
threads to receive their output on the same thread the store was created on.
435435
"""
436436

437437
case let .send(action, isFromViewStore: true):
438438
message = """
439439
"ViewStore.send(\(debugCaseOutput(action)))" was called on the wrong thread. Make \
440-
sure that "ViewStore.send" is always called on the initial thread.
440+
sure that "ViewStore.send" is always called on the same thread the store was created on.
441441
"""
442442

443443
case let .send(action, isFromViewStore: false):
444444
message = """
445445
An effect emitted the action "\(debugCaseOutput(action))" from the wrong thread. Make sure \
446446
to use ".receive(on:)" on any effects that execute on background threads to receive their \
447-
output on the initial thread.
447+
output on the same thread the store was created on.
448448
"""
449449
}
450450

@@ -458,8 +458,8 @@ public final class Store<State, Action> {
458458
459459
\(message)
460460
461-
Initial thread: \(self.initialThread)
462-
Current thread: \(Thread.current)
461+
Store created on: \(self.initialThread)
462+
Action sent on: \(Thread.current)
463463
464464
The "Store" class is not thread-safe, and so all interactions with an instance of "Store" \
465465
(including all of its scopes and derived view stores) must be done on the same thread.

0 commit comments

Comments
 (0)