Skip to content

Commit 9b78a70

Browse files
stephencelismluisbrown
authored andcommitted
Fix docs
1 parent ae5a593 commit 9b78a70

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Sources/ComposableArchitecture/Store.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ import ReactiveSwift
7171
/// .tabItem { Text("Profile") }
7272
/// }
7373
/// }
74+
/// }
7475
/// ```
7576
///
7677
/// ### Thread safety
@@ -85,13 +86,14 @@ import ReactiveSwift
8586
/// It is possible to make this process thread-safe by introducing locks or queues, but this
8687
/// introduces new complications:
8788
///
88-
/// * If done simply with `DispatchQueue.main.async` you will incur a thread hop even when you are
89-
/// already on the main thread. This can lead to unexpected behavior in UIKit and SwiftUI, where
90-
/// sometimes you are required to do work synchronously, such as in animation blocks.
89+
/// * If done simply with `DispatchQueue.main.async` you will incur a thread hop even when you are
90+
/// already on the main thread. This can lead to unexpected behavior in UIKit and SwiftUI, where
91+
/// sometimes you are required to do work synchronously, such as in animation blocks.
92+
///
93+
/// * It is possible to create a scheduler that performs its work immediately when on the main
94+
/// thread and otherwise uses `DispatchQueue.main.async` (_e.g._, see Combine Schedulers'
95+
/// [UIScheduler][uischeduler]).
9196
///
92-
/// * It is possible to create a scheduler that performs its work immediately when on the main
93-
/// thread and otherwise uses `DispatchQueue.main.async` (e.g. see CombineScheduler's
94-
/// [UIScheduler](https://github.com/pointfreeco/combine-schedulers/blob/main/Sources/CombineSchedulers/UIScheduler.swift)).
9597
/// This introduces a lot more complexity, and should probably not be adopted without having a very
9698
/// good reason.
9799
///
@@ -111,6 +113,8 @@ import ReactiveSwift
111113
/// However, by leaving scheduling out of the ``Store`` we get to test these aspects of our effects
112114
/// if we so desire, or we can ignore if we prefer. We have that flexibility.
113115
///
116+
/// [uischeduler]: https://github.com/pointfreeco/combine-schedulers/blob/main/Sources/CombineSchedulers/UIScheduler.swift
117+
///
114118
/// #### Thread safety checks
115119
///
116120
/// The store performs some basic thread safety checks in order to help catch mistakes. Stores

0 commit comments

Comments
 (0)