Comment

Comment by danbruc

A common approach to mitigating the described data race without using blocking locks is to utilize a sequence lock.

A sequence lock is a blocking lock. If the writer dies between the two increment operations, then the readers will spin forever waiting for the counter to become even again.

parent danbruc 2 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton