Skip to content

Measure (and handle) starvation issues with CAS loops #12

Open
@martong

Description

@martong

From http://preshing.com/20150402/you-can-do-any-kind-of-atomic-read-modify-write-operation/

Suppose thread A has to do a bunch of extra work in the "modify" step for some reason, such that one of threads B, C, ... has almost always gotten in and updated the variable by the time A gets to the CAS call. Then A might have to retry many, many times before it succeeds.

...
Preshing:

I'm pretty sure individual threads could be made to starve indefinitely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions