{"id":13578956,"url":"https://github.com/jonhoo/bus","last_synced_at":"2025-05-14T18:05:36.122Z","repository":{"id":40589210,"uuid":"60133277","full_name":"jonhoo/bus","owner":"jonhoo","description":"Efficient, lock-free, bounded Rust broadcast channel","archived":false,"fork":false,"pushed_at":"2023-09-09T16:14:15.000Z","size":193,"stargazers_count":815,"open_issues_count":10,"forks_count":39,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-05-07T09:56:13.643Z","etag":null,"topics":["broadcast","communication","lock-free","rust","synchronization"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonhoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-06-01T00:38:04.000Z","updated_at":"2025-05-06T08:19:20.000Z","dependencies_parsed_at":"2024-01-14T07:19:25.655Z","dependency_job_id":null,"html_url":"https://github.com/jonhoo/bus","commit_stats":{"total_commits":156,"total_committers":11,"mean_commits":"14.181818181818182","dds":"0.16025641025641024","last_synced_commit":"48769f2da4fb712f2dc76adcb32573f61d3a91ce"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonhoo","download_url":"https://codeload.github.com/jonhoo/bus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198514,"owners_count":22030965,"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":["broadcast","communication","lock-free","rust","synchronization"],"created_at":"2024-08-01T15:01:35.300Z","updated_at":"2025-05-14T18:05:31.113Z","avatar_url":"https://github.com/jonhoo.png","language":"Rust","readme":"# bus\n\n[![Crates.io](https://img.shields.io/crates/v/bus.svg)](https://crates.io/crates/bus)\n[![Documentation](https://docs.rs/bus/badge.svg)](https://docs.rs/bus/)\n[![Codecov](https://codecov.io/github/jonhoo/bus/coverage.svg?branch=master)](https://codecov.io/gh/jonhoo/bus)\n\nBus provides a lock-free, bounded, single-producer, multi-consumer, broadcast channel.\n\n**NOTE: bus sometimes busy-waits in the current implementation, which may cause increased CPU usage — see [#23](https://github.com/jonhoo/bus/issues/23).**\n\nIt uses a circular buffer and atomic instructions to implement a lock-free single-producer,\nmulti-consumer channel. The interface is similar to that of the `std::sync::mpsc` channels,\nexcept that multiple consumers (readers of the channel) can be produced, whereas only a single\nsender can exist. Furthermore, in contrast to most multi-consumer FIFO queues, bus is\n*broadcast*; every send goes to every consumer.\n\nI haven't seen this particular implementation in literature (some extra bookkeeping is\nnecessary to allow multiple consumers), but a lot of related reading can be found in Ross\nBencina's blog post [\"Some notes on lock-free and wait-free\nalgorithms\"](http://www.rossbencina.com/code/lockfree).\n\nSee [the documentation] for usage examples.\n\n  [the documentation]: https://docs.rs/bus/\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Fbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonhoo%2Fbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Fbus/lists"}