Commit 0ff56ff
committed
Fixed compare_and_set on MutexAtomicReference.
The pure-Ruby version would return false if the lock could not be
obtained. This is distinctly different behavior from the C and Java
implementations which only return false if the values did not match.
This update brings parity to all implementations.1 parent 2b868ae commit 0ff56ff
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | | - | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
0 commit comments