Skip to content

could std::intrinsics::atomic_max be exposed via an AtomicUsize::fetch_max method? #48384

Closed
@spacejam

Description

@spacejam

As part of my recent work on supporting transactions in sled I've wanted to take advantage of the atomic_max intrinsic so that I can implement a lock-free concurrency control protocol more efficiently, without spinning on CAS in a loop. It would be wonderful if I could do this without relying on compiling C. Specifically, updating the read timestamp of an item read in an MVOCC transaction, where read items need to be marked as having been read "at least as high as" a transaction timestamp being executed by a particular thread.

Are there any blockers to adding this? I'm happy to write the code that exposes it if not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions