package hack_parallel

  1. Overview
  2. Docs
Parallel and shared memory library

Install

Dune Dependency

Authors

Maintainers

Sources

1.0.1.tar.gz
md5=ba7c72bc207e326b72e294fc76f6ad2c
sha512=5020d47f97bea2f88e2a40411894d03232a7f2282606926c93c7d4c96d72e94a966be852897a9b16f7e0893ba376512045abb9d93020a7c03c3def4f3d918f8e

Description

Parallel and shared memory components used in Facebook's Hack, Flow, and Pyre projects.

Published: 25 Feb 2021

README

README

This library contains the core parallel and shared memory components used in 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.

This library extracts the core components, wraps them in a tidier interface, and builds with dune. It is a personal best effort and offered 'as-is': there is no promise of maintenance, and no official support or affiliation with the projects and/or companies supporting the projects above.

The code contains potentially leftover and irrelevant functions (again, best effort), and do not necessarily have the most recent upstream changes of corresponding modules. This is especially the case for modules in procs and heap (cf. respective procs and heap in Hack). Pull requests for upstream changes to these files are welcome. The files in the current library are current as of around mid-2018.

Install and Example

Hack_parallel is available on opam:

opam install hack_parallel

Please see the example project here to get a feel for the interface: https://github.com/rvantonder/hack-parallel-example

Some more details

The design decisions behind the parallel architecture and shared memory are best explained by this video and this part of the documentation. You can ignore the scary THIS CODE ONLY WORKS WITH HACK--the code does work generally, but you have to keep in mind the restrictions on memory operations as explained in the rest of the file. The motivation behind the shared memory implementation is similar to ancient.

Dev Dependencies

None

Used by (1)

  1. comby

Conflicts

None

OCaml

Innovation. Community. Security.