Comment

Comment by sdab

My c++ solution: https://gist.github.com/anonymous/7e6cc8f58e9cde1b6fda

I believe it follows all of the requirements. There is one glaring flaw which is that it uses a condition variable per 'wait_until_equal' call, though it uses only N mutexes. So this doesn't fall under the N^2 primitives (in the case of many waits), though its unclear to me if thats an official rule.

Im happy to listen to feedback or if someone sees an error.

parent sdab 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton