{"id":16225556,"url":"https://github.com/babichjacob/awaitable-bool","last_synced_at":"2025-04-08T03:40:03.854Z","repository":{"id":192271545,"uuid":"686752101","full_name":"babichjacob/awaitable-bool","owner":"babichjacob","description":"A Tokio-powered awaitable bool","archived":false,"fork":false,"pushed_at":"2023-09-20T17:50:59.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T01:41:05.579Z","etag":null,"topics":["async","bool","event","flag","rust","tokio"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/awaitable-bool","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}},"created_at":"2023-09-03T20:27:44.000Z","updated_at":"2023-09-03T20:30:51.000Z","dependencies_parsed_at":"2024-11-04T02:00:30.466Z","dependency_job_id":"1ee15cfc-d103-4dd9-8516-bf1eabd7b493","html_url":"https://github.com/babichjacob/awaitable-bool","commit_stats":null,"previous_names":["babichjacob/awaitable-bool"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babichjacob%2Fawaitable-bool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babichjacob%2Fawaitable-bool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babichjacob%2Fawaitable-bool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babichjacob%2Fawaitable-bool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babichjacob","download_url":"https://codeload.github.com/babichjacob/awaitable-bool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773743,"owners_count":20993633,"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":["async","bool","event","flag","rust","tokio"],"created_at":"2024-10-10T12:45:28.315Z","updated_at":"2025-04-08T03:40:03.822Z","avatar_url":"https://github.com/babichjacob.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🎚️ Awaitable Bool\u003c/h1\u003e\n\nThis Rust library is a bool that can be waited to be set to true or set to false.\n\n## 💻 Installation\n\nThis crate is [published to crates.io as `awaitable-bool`](https://crates.io/crates/awaitable-bool), so you can do\n\n```sh\ncargo add awaitable-bool\n```\n\nto add it to your project's dependencies.\n\n## 🛠 Usage\n\nYou probably don't want to use this if you aren't me; I'm not familiar enough with [atomics](https://doc.rust-lang.org/stable/std/sync/atomic/) (which is how `AwaitableBool` is implemented) to know the correctness of the code!\n\n## 😵 Help! I have a question\n\nCreate an issue and I'll try to help.\n\n## 😡 Fix! There is something that needs improvement\n\nCreate an issue or pull request and I'll try to fix.\n\n## 📄 License\n\nLicensed under either of:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE] or https://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT] or https://opensource.org/licenses/MIT)\n\nat your option.\n\n## 🙏 Attribution\n\n@devalain's [`future-bool`](https://crates.io/crates/future-bool) is an existing Rust crate that already works very closely to this.\n\nThe idea is highly inspired by [Python's `asyncio.Event`](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event), but an `AwaitableBool` can be waited for to become 'clear' too (not just 'set').\n\nThis library is implemented with [`Tokio`](https://tokio.rs/)'s [`Notify` synchronization tool](https://docs.rs/tokio/1.32.0/tokio/sync/struct.Notify.html).\n\nI also developed [`async-gate`](https://github.com/babichjacob/async-gate) right before making `awaitable-bool`. That breaks down changing the value of the bool and waiting for value changes into two different types (`Lever` and `Gate` respectively). It is more complex.\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabichjacob%2Fawaitable-bool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabichjacob%2Fawaitable-bool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabichjacob%2Fawaitable-bool/lists"}