Skip to content

Consider Load-Link Store-Conditional abstraction #1

Open

Description

@jzabroski

Rather than locking your type buffer, consider implementing a Load-Link Store-Conditional abstraction. Rather than worry about the state, just retry the whole chain if Store-Conditional fails.

The main benefit I see is it would potentially uncomplicate the code a lot. I'm not sure if it would be any faster, but it's conceivable it would.

Activity

  1. jzabroski commented on Mar 18, 2019

    @jzabroski
    Author

    If you're interested, I know my friend Sandro Magi has written a LLSC abstraction in his Sasa NuGet package in the Sasa.Concurrency namespace. That would probably lower the bar for prototyping getting rid of the lock requirements.

  2. gafter commented on Jul 2, 2019

    @gafter
    Owner

    @jzabroski Because the hash table has to be expended by doubling the size of the array and rebucketing the data, I don't think that technique works well. In any case, we only lock on writes, not on reads.

  3. gafter commented on Jul 2, 2019

    @gafter
    Owner

    I should also mention that the implementation is intended to be suitable for use in the core library. Taking advantage of a higher-level library would undermine that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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