{"id":16613193,"url":"https://github.com/c-cube/fuseau","last_synced_at":"2025-07-23T10:33:48.367Z","repository":{"id":204821840,"uuid":"712714556","full_name":"c-cube/fuseau","owner":"c-cube","description":"[alpha] lightweight fiber library for OCaml 5","archived":false,"fork":false,"pushed_at":"2024-11-05T03:56:55.000Z","size":3549,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-22T03:10:45.192Z","etag":null,"topics":["effects","fibers","libuv","ocaml","ocaml5"],"latest_commit_sha":null,"homepage":"https://c-cube.github.io/fuseau/","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c-cube.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-11-01T03:20:27.000Z","updated_at":"2025-04-12T08:07:47.000Z","dependencies_parsed_at":"2024-02-27T04:38:32.855Z","dependency_job_id":null,"html_url":"https://github.com/c-cube/fuseau","commit_stats":null,"previous_names":["c-cube/luv2loop","c-cube/fuseau"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/c-cube/fuseau","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-cube%2Ffuseau","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-cube%2Ffuseau/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-cube%2Ffuseau/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-cube%2Ffuseau/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c-cube","download_url":"https://codeload.github.com/c-cube/fuseau/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-cube%2Ffuseau/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266662802,"owners_count":23964616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["effects","fibers","libuv","ocaml","ocaml5"],"created_at":"2024-10-12T01:46:24.580Z","updated_at":"2025-07-23T10:33:48.338Z","avatar_url":"https://github.com/c-cube.png","language":"OCaml","readme":"# Fuseau\n\nThis is an experimental concurrency/IO library for OCaml 5. Currently the only backend is a naive one\nusing `Unix.select` but I plan to add more robust ones.\n\nA basic example that spins 4 concurrent loops in direct style:\n\n```ocaml\n# let spf = Printf.sprintf\nval spf : ('a, unit, string) format -\u003e 'a = \u003cfun\u003e\n\n# let main () =\n  print_endline \"entering main\";\n\n  let computations =\n    Array.init 4 (fun j -\u003e\n        Fuseau.spawn @@ fun () -\u003e\n        print_endline @@ spf \"spawn fiber %d\" j;\n        for i = 1 to 3 do\n          (* this suspends the fiber for 500ms *)\n          Fuseau.sleep_s 0.5;\n          print_endline @@ spf \"iter %d (fiber %d)\" i j\n        done)\n  in\n\n  (* wait for the loops to end *)\n  Array.iter Fuseau.await computations;\n  print_endline \"done\"\nval main : unit -\u003e unit = \u003cfun\u003e\n\n# let () = Fuseau_unix.main main\nentering main\nspawn fiber 0\nspawn fiber 1\nspawn fiber 2\nspawn fiber 3\niter 1 (fiber 0)\niter 1 (fiber 1)\niter 1 (fiber 2)\niter 1 (fiber 3)\niter 2 (fiber 0)\niter 2 (fiber 1)\niter 2 (fiber 2)\niter 2 (fiber 3)\niter 3 (fiber 0)\niter 3 (fiber 1)\niter 3 (fiber 2)\niter 3 (fiber 3)\ndone\n```\n\n## License\n\nMIT licensed.\n\n## Name\n\nFuseau (\"fuh-zo\") is french for a spindle. It's vaguely related to fibers :-)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-cube%2Ffuseau","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-cube%2Ffuseau","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-cube%2Ffuseau/lists"}