{"id":19140730,"url":"https://github.com/tijn/fork_pool","last_synced_at":"2026-06-10T00:30:19.908Z","repository":{"id":7538721,"uuid":"8890874","full_name":"tijn/fork_pool","owner":"tijn","description":"Imagine a pool containing a certain number of forks. These can be used to fork off code blocks.","archived":false,"fork":false,"pushed_at":"2023-10-30T04:23:37.000Z","size":25,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T15:12:11.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/tijn.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2013-03-19T22:27:11.000Z","updated_at":"2022-02-10T09:27:21.000Z","dependencies_parsed_at":"2025-01-03T15:22:10.771Z","dependency_job_id":null,"html_url":"https://github.com/tijn/fork_pool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tijn%2Ffork_pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tijn%2Ffork_pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tijn%2Ffork_pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tijn%2Ffork_pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tijn","download_url":"https://codeload.github.com/tijn/fork_pool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240222499,"owners_count":19767458,"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","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":[],"created_at":"2024-11-09T07:18:35.351Z","updated_at":"2026-06-10T00:30:17.717Z","avatar_url":"https://github.com/tijn.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"fork_pool\n=========\n\nA pool that contains a number of forks. The pool can use this cutlery to fork off code blocks.\n\nWhat?\n-----\n\nYeah, so, I was just reading about processes and forking in Ruby and then I decided I would learn more by actually\nwriting a small library. This is it.\n\nUsage\n-----\n\n```ruby\npool = ForkPool.new(4) # max 4 childs processes at a time\n\n# ForkPool#spork forks off a block of code and also spoons up finished processes.\npool.spork do\n  do_something_impressive_that_needs_multiple_processors!\nend\n\npool.wait # optional, you may opt to let the parent process die before its childs. Your choice.\n\nputs \"done!\"\n```\n\nKnown issues\n------------\n\n```ForkPool#wait``` will wait for ANY child process to die even if it was started by another pool.\n\nReally, if you try to use this code with multiple pools (that have processes running at the same time) you are asking for trouble.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftijn%2Ffork_pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftijn%2Ffork_pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftijn%2Ffork_pool/lists"}