Comment

Comment by chris_va

In case people find it interesting, this is very similar to how one efficiently builds a search engine for high QPS and update rate (lockless realtime document index), though that example is slightly more involved than a hash map.

The basic premise is that the entry point to your data structure (or internal pointers) can change over time. You don't dismantle older entry points/pointers until all older readers release, though you don't have to wait for all concurrent readers to exit.

parent chris_va 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton