A parallel and shared memory library based on Hack's implementation


#1

Hack_parallel is a standalone parallel and shared memory library based on the components used in FB tools Hack, Flow, and Pyre. The internals of these components are little known outside of these projects, yet stand to benefit the OCaml community more generally, both for practical use and educational purposes. So I extracted the core parts and packaged it up; more information can be found in the project README.

I put together an example project to illustrate the basic interface.


#2

Exciting stuff!

But how seriously should I take these warnings?


#3

From some more details:

You can ignore the scary THIS CODE ONLY WORKS WITH HACK. The implementation works generally (it’s used in Flow/Pyre and my own projects without problems). The warning is overcompensating so that people do not treat it like a “generic atomic hashtable for OCaml”. The data structure and constraints on memory operations are explained well here. I may document the points in the video in future, but hope that helps for now.