Skip to content

Atomic and non-atomic operations on the same key #57

@lann

Description

@lann

Somewhat related to #51: what are the semantics of having both e.g. successful set and swap operate on the same key at the "same time"?

A few options come to mind:

  • Undefined (don't do that)
  • Result is either the new set value or the new swap value
    • or the old swap value? 🤔
  • Namespace atomic keys; set('foo') and increment('foo') refer to two different keys

Any other options? I can't think of anything stronger that would be supported by enough implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions