File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -301,12 +301,12 @@ julia> sum_multi_good(1:1_000_000)
301
301
500000500000
302
302
```
303
303
304
- Note that we do not use buffers based on the ` threadid() ` i.e. ` buffers = zeros(Threads.nthreads()) ` because tasks can
305
- actually change thread at yield points, known as task migration (docs?? ), which would introduce data races for such a
306
- buffering approach.
304
+ Note buffers should not be managed based on the ` threadid() ` i.e. ` buffers = zeros(Threads.nthreads()) ` because tasks can
305
+ actually change thread at yield points, known as [ task migration] ( @ ref man-task-migration ), which introduces potential for
306
+ data races for such a buffering approach.
307
307
308
- Another option, which would not be performant for a naive sum like this, is the use of atomic operations on variables shared
309
- across all threads .
308
+ Another option is the use of atomic operations on variables shared across tasks/threads, which may be more performant
309
+ depending on the characteristics of the operations .
310
310
311
311
## Atomic Operations
312
312
You can’t perform that action at this time.
0 commit comments