{"id":16225574,"url":"https://github.com/babichjacob/async-gate","last_synced_at":"2026-02-14T18:32:18.068Z","repository":{"id":192132404,"uuid":"686127156","full_name":"babichjacob/async-gate","owner":"babichjacob","description":"A Tokio-powered asynchronous gate","archived":false,"fork":false,"pushed_at":"2025-03-19T19:18:33.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-22T02:59:00.908Z","etag":null,"topics":["async","event","flag","gate","rust","tokio"],"latest_commit_sha":null,"homepage":"","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/babichjacob.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-01T20:13:54.000Z","updated_at":"2025-03-19T19:18:37.000Z","dependencies_parsed_at":"2023-09-02T20:11:47.428Z","dependency_job_id":"cabaf6a9-ae63-4715-8cbc-12dae85dd1b6","html_url":"https://github.com/babichjacob/async-gate","commit_stats":null,"previous_names":["babichjacob/async-gate"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/babichjacob/async-gate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babichjacob%2Fasync-gate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babichjacob%2Fasync-gate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babichjacob%2Fasync-gate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babichjacob%2Fasync-gate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babichjacob","download_url":"https://codeload.github.com/babichjacob/async-gate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babichjacob%2Fasync-gate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29452371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["async","event","flag","gate","rust","tokio"],"created_at":"2024-10-10T12:45:30.413Z","updated_at":"2026-02-14T18:32:18.050Z","avatar_url":"https://github.com/babichjacob.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🚧 Async Gate\u003c/h1\u003e\r\n\r\nThis Rust library is an asynchronous \"gate\" that can be waited to be raised or lowered, as controlled by a corresponding \"lever\".\r\n\r\n## 💻 Installation\r\n\r\nThis crate is [published to crates.io as `async-gate`](https://crates.io/crates/async-gate), so you can do\r\n\r\n```sh\r\ncargo add async-gate\r\n```\r\n\r\nto add it to your project's dependencies.\r\n\r\n## 🛠 Usage\r\n\r\nYou probably don't want to use this if you aren't me; the code is clunky and only moderately documented and tested. You might benefit more from using a plain [`tokio::sync::watch` channel](https://docs.rs/tokio/1.32.0/tokio/sync/watch/index.html) with your own layer of logic on top.\r\n\r\n## 😵 Help! I have a question\r\n\r\nCreate an issue and I'll try to help.\r\n\r\n## 😡 Fix! There is something that needs improvement\r\n\r\nCreate an issue or pull request and I'll try to fix.\r\n\r\n## 📄 License\r\n\r\nLicensed under either of:\r\n\r\n- Apache License, Version 2.0 ([LICENSE-APACHE] or https://www.apache.org/licenses/LICENSE-2.0)\r\n- MIT license ([LICENSE-MIT] or https://opensource.org/licenses/MIT)\r\n\r\nat your option.\r\n\r\n## 🙏 Attribution\r\n\r\nThis implementation is heavily borrowed from @EFanZh's contributions [in this Rust forum post](https://users.rust-lang.org/t/a-flag-type-that-supports-waiting-asynchronously/91108/6).\r\n\r\nThe idea is highly inspired by [Python's `asyncio.Event`](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event), but a gate can be waited for to become 'clear' too (not just 'set').\r\n\r\nThis library is implemented with [`Tokio`](https://tokio.rs/)'s [`watch` channel](https://docs.rs/tokio/1.32.0/tokio/sync/watch/index.html).\r\n\r\nI also developed [`awaitable-bool`](https://github.com/babichjacob/awaitable-bool) right after making `async-gate`. That unifies changing the value of the bool and waiting for value changes into a single type (`AwaitableBool`). It is simpler than this crate. \r\n\r\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabichjacob%2Fasync-gate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabichjacob%2Fasync-gate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabichjacob%2Fasync-gate/lists"}