Skip to content

Commit d6d0234

Browse files
add note leading into atomics
1 parent 3ca288a commit d6d0234

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/src/manual/multi-threading.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ Note that we do not use buffers based on the `threadid()` i.e. `buffers = zeros(
284284
actually change thread at yield points, known as task migration (docs??), which would introduce data races for such a
285285
buffering approach.
286286

287+
Another option, which would not be performant for a naive sum like this, is the use of atomic operations on variables shared
288+
across all threads.
289+
287290
## Atomic Operations
288291

289292
Julia supports accessing and modifying values *atomically*, that is, in a thread-safe way to avoid

0 commit comments

Comments
 (0)