We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99673bb commit 52b460bCopy full SHA for 52b460b
1 file changed
test/cell_test.exs
@@ -48,13 +48,7 @@ defmodule CellTest do
48
output_list =
49
Enum.map(1..100, fn _i ->
50
Task.async(fn ->
51
- Cas.Cell.swap!(cell, fn previous ->
52
- # 11-21ms of random sleep.
53
- # when using Cas.Cell, you'd never put a side effect in here
54
- # like this, but this is a demonstration
55
- :timer.sleep(:rand.uniform(10) + 10)
56
- previous + 1
57
- end)
+ Cas.Cell.swap!(cell, fn previous -> previous + 1 end)
58
end)
59
60
|> Enum.map(fn task -> Task.await(task) end)
0 commit comments