Skip to content

Commit 1f033ba

Browse files
committed
improve docs of Reference.modify a bit
1 parent 4fc0c2b commit 1f033ba

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

effect/ref.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ def modify(self, transformer):
2828
"""
2929
Return an Effect that updates the value with ``fn(old_value)``.
3030
31+
:param transformer: Function that takes old value and returns the new
32+
value.
33+
3134
This is not guaranteed to be linearizable if multiple threads are
32-
modifying the reference at the same time.
35+
modifying the reference at the same time. It is safe to assume
36+
consistent modification as long as you're not using multiple threads,
37+
though.
3338
"""
3439
return Effect(ModifyReference(ref=self, transformer=transformer))
3540

0 commit comments

Comments
 (0)