dbuenzli/affect
{ "createdAt": "2022-02-28T23:17:32Z", "defaultBranch": "master", "description": "Composable concurrency primitives with OCaml effects handlers (unreleased)", "fullName": "dbuenzli/affect", "homepage": "https://erratique.ch/software/affect", "language": "OCaml", "name": "affect", "pushedAt": "2024-10-06T23:32:21Z", "stargazersCount": 43, "topics": [], "updatedAt": "2024-11-04T23:38:42Z", "url": "https://github.com/dbuenzli/affect"}Affect — Concurrency and parallelism for OCaml 5
Section titled “Affect — Concurrency and parallelism for OCaml 5”Affect is a streamlined and natural [concurrency model] for OCaml 5. It just provides parallel asynchronous function calls with structured cooperative concurrency and cancellation.
Affect is distributed under the ISC license. It has no dependencies.
Homepage: https://erratique.ch/software/affect
[concurrency model] !: https://erratique.ch/software/affect/doc/Fiber/index.html#concurrency_model
Installation
Section titled “Installation”Affect can be installed with opam:
opam pin add affect https://erratique.ch/repos/affect.gitIf you don’t use opam consult the [opam]!(opam) file for build
instructions.
Documentation
Section titled “Documentation”The documentation can be consulted [online][doc] or via odig doc affect.
Questions are welcome but better asked on the [OCaml forum][ocaml-forum] than on the issue tracker.
[doc] !: https://erratique.ch/software/affect/doc/ [ocaml-forum] !: https://discuss.ocaml.org/
Sample code
Section titled “Sample code”A few basic sample programs can be found in the [test]!(test/) directory.
- [
ping.ml]!(test/ping.ml), client and server usingFunixto do useless networking on your machine. - [
mouse.ml]!(test/mouse.ml), proof of concept interfacing with the SDL event loop. - [
happy_eyeballs.ml]!(test/happy_eyeballs.ml), an implementation of a happy eyeballs
You can run them with b0 -- ping or b0 -- mouse.