Skip to content

Commit b6e5e65

Browse files
committed
Fix a few typos
1 parent 273f326 commit b6e5e65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/Type/atomicint.pod6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,22 +154,22 @@ Will reliably only ever print C<Master!> one time, as only one of the threads
154154
will be successful in changing the 0 into a 1.
155155
156156
Both C<$expected> and C<$value> will be coerced to C<Int> and unboxed if
157-
needed. An exception will be thrown if they value cannot be represented as a
157+
needed. An exception will be thrown if the value cannot be represented as a
158158
64-bit integer. If the size of C<atomicint> is only 32 bits then the values
159159
will be silently truncated to this size.
160160
161161
The third form, taking a code object, will first do an atomic fetch of the
162162
current value and invoke the code object with it. It will then try to do an
163163
atomic compare and swap of the target, using the value passed to the code
164-
object as C<$exepcted> and the result of the code object as C<$value>. If
164+
object as C<$expected> and the result of the code object as C<$value>. If
165165
this fails, it will read the latest value, and retry, until a CAS operation
166166
succeeds. Therefore, an atomic multiply of an C<atomicint> C<$i> by 2 could
167167
be implemented as:
168168
169169
cas $i, -> int $current { $current * 2 }
170170
171171
If another thread changed the value while C<$current * 2> was being calculated
172-
then the block would be called again with the latest value for a futher
172+
then the block would be called again with the latest value for a further
173173
attempt, and this would be repeated until success.
174174
175175
=head1 Operators

0 commit comments

Comments
 (0)