Skip to content

Commit 6d3d340

Browse files
authored
Merge pull request #89 from rolson/patch-1
Fix reference doc variable references
2 parents 8bdc853 + cbd73b1 commit 6d3d340

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/Atomics/AtomicLazyReference.swift.gyb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,16 @@ extension ${type} {
179179
///
180180
/// ```
181181
/// class Image {
182-
/// var _histogram: UnsafeAtomicLazyReference<Histogram> = ...
182+
/// var _histogram: UnsafeAtomicLazyReference<Histogram> = .init()
183183
///
184184
/// // This is safe to call concurrently from multiple threads.
185185
/// var atomicLazyHistogram: Histogram {
186-
/// if let histogram = _histogram.load() { return foo }
186+
/// if let histogram = _histogram.load() { return histogram }
187187
/// // Note that code here may run concurrently on
188188
/// // multiple threads, but only one of them will get to
189189
/// // succeed setting the reference.
190190
/// let histogram = ...
191-
/// return _histogram.storeIfNilThenLoad(foo)
191+
/// return _histogram.storeIfNilThenLoad(histogram)
192192
/// }
193193
/// ```
194194
///

0 commit comments

Comments
 (0)