Skip to content

Commit 9d1cf4b

Browse files
committed
Document mixing increment with other ops
This is not necessarily the desired behavior but reflects the actual behavior of current implementations.
1 parent da58d54 commit 9d1cf4b

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

imports.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ that is needed to ensure the atomicity of the operation</p>
242242
returns the new value.</p>
243243
<p>If the key does not exist in the store, it creates a new key-value pair with the value set
244244
to the given delta.</p>
245+
<p>The result of using both <a href="#increment"><code>increment</code></a> and any other operation in this spec with the same key
246+
is implementation-dependent.</p>
245247
<p>If any other error occurs, it returns an <code>Err(error)</code>.</p>
246248
<h5>Params</h5>
247249
<ul>

wit/atomic.wit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ interface atomics {
3737
/// If the key does not exist in the store, it creates a new key-value pair with the value set
3838
/// to the given delta.
3939
///
40+
/// The result of using both `increment` and any other operation in this spec with the same key
41+
/// is implementation-dependent.
42+
///
4043
/// If any other error occurs, it returns an `Err(error)`.
4144
increment: func(bucket: borrow<bucket>, key: string, delta: s64) -> result<s64, error>;
4245

0 commit comments

Comments
 (0)