{"id":17681827,"url":"https://github.com/jgaskins/mpsc","last_synced_at":"2025-05-12T23:12:08.458Z","repository":{"id":143300859,"uuid":"343218961","full_name":"jgaskins/mpsc","owner":"jgaskins","description":"Multi-Producer/Single-Consumer channels in Crystal","archived":false,"fork":false,"pushed_at":"2021-11-28T00:01:11.000Z","size":6,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T18:16:17.669Z","etag":null,"topics":["channels","crystal"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgaskins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-02-28T21:29:37.000Z","updated_at":"2024-08-04T08:34:54.000Z","dependencies_parsed_at":"2023-04-14T05:22:58.787Z","dependency_job_id":null,"html_url":"https://github.com/jgaskins/mpsc","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/jgaskins%2Fmpsc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Fmpsc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Fmpsc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Fmpsc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgaskins","download_url":"https://codeload.github.com/jgaskins/mpsc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837459,"owners_count":21971984,"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":["channels","crystal"],"created_at":"2024-10-24T09:12:16.294Z","updated_at":"2025-05-12T23:12:08.431Z","avatar_url":"https://github.com/jgaskins.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mpsc\n\nMPSC is an implementation of a multi-producer/single-consumer channel. This is useful if you only ever consume a channel from within a single fiber.\n\nMPSC channels are unbounded. Calling `send` will never block.\n\n**Note:** This shard is _not_ suitable for consuming the same channel from multiple fibers, even if they don't consume it concurrently. Once you call `receive` from a fiber, the receiving end of the channel is locked to that fiber.\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     mpsc:\n       github: jgaskins/mpsc\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"mpsc\"\n\nchannel = MPSC::Channel(String).new\n\nspawn channel.send \"hello\"\n\nchannel.receive # \"hello\"\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/jgaskins/mpsc/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Reformat the code (`crystal tool format .`)\n4. Commit your changes (`git commit -am 'Add some feature'`)\n5. Push to the branch (`git push origin my-new-feature`)\n6. Create a new Pull Request\n\n## Contributors\n\n- [Jamie Gaskins](https://github.com/jgaskins) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaskins%2Fmpsc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgaskins%2Fmpsc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaskins%2Fmpsc/lists"}