Concurrent Hash Table Designs

(bluuewhale.github.io)

46 points | by signa11 3 days ago

2 comments

  • mrkeen 40 minutes ago

      public V get(Object key) { synchronized (mutex) { ... } }
      public V put(K key, V value) { synchronized (mutex) { ... } }
      public V remove(Object key) { synchronized (mutex) { ... } }
    
    > From a correctness standpoint, this strategy is almost trivial to reason about.

    It is indeed trivial to reason about. This design invites users to stumble into the race condition between get and set.

  • nickmonad 3 hours ago
    Would love to read this, although I'm seeing some pretty horrific code formatting issues in both Firefox and Chrome.
    • ramon156 2 hours ago
      weirdest part is, the initial load looks fine (try refreshing, scroll persists).

      firefox's reader view helps too

      • manwe150 56 minutes ago
        I saw a blog about this yesterday: disable extensions (notably 1Password) to fix formatting inside code tags.