Atomic updates: Difference between revisions

m
(Initial FutureBasic task solution added)
m (→‎{{header|Wren}}: Minor tidy)
 
(One intermediate revision by one other user not shown)
Line 1,552:
{{output}}
<pre>
Initial array: [�2828,�7373,�9090, 1,�7575,�5151,�6969,�3535,�7070,�28�28] Sum = 520
Current values: [�5252,�5252,�5252,�5252,�5252,�5252,�5252,�5252,�5252,�52�52] Sum = 520
19 from 3 to 5: [�5252,�5252,�5252,�3434,�5252,�7070,�5252,�5252,�5252,�52�52] Sum = 520
 
</pre>
 
 
 
 
 
=={{header|Go}}==
Line 4,023 ⟶ 4,018:
 
Fibers are cooperatively (rather than preemptively) scheduled and only one fiber can run at a time. Consequently, simultaneous operations are impossible and all operations are therefore atomic by their nature.
<syntaxhighlight lang="ecmascriptwren">import "random" for Random
import "scheduler" for Scheduler
import "timer" for Timer
import "./math" for Nums
 
var Rnd = Random.new()
9,482

edits