{"id":16162381,"url":"https://github.com/sunsided/rendezvous-rs","last_synced_at":"2026-02-18T07:31:52.685Z","repository":{"id":210266100,"uuid":"726169157","full_name":"sunsided/rendezvous-rs","owner":"sunsided","description":"Easier rendezvous channels for thread synchronization","archived":false,"fork":false,"pushed_at":"2025-06-24T08:47:02.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T03:10:39.936Z","etag":null,"topics":["rendezvous","rust","thread","thread-synchronization"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rendezvous","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunsided.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-01T17:21:55.000Z","updated_at":"2025-06-24T08:47:06.000Z","dependencies_parsed_at":"2024-11-02T08:01:09.492Z","dependency_job_id":"393cc665-7dea-4fac-848a-f049ff222b18","html_url":"https://github.com/sunsided/rendezvous-rs","commit_stats":null,"previous_names":["sunsided/rendezvous-rs"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sunsided/rendezvous-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Frendezvous-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Frendezvous-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Frendezvous-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Frendezvous-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunsided","download_url":"https://codeload.github.com/sunsided/rendezvous-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Frendezvous-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29572398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T06:19:27.422Z","status":"ssl_error","status_checked_at":"2026-02-18T06:18:44.348Z","response_time":162,"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":["rendezvous","rust","thread","thread-synchronization"],"created_at":"2024-10-10T02:29:56.124Z","updated_at":"2026-02-18T07:31:52.670Z","avatar_url":"https://github.com/sunsided.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easier Rendezvous Channels\n\nIn rust, [mpsc::channel](https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html) can be used as a synchronization\nprimitive between threads by utilizing the fact that we can block on the receiver's `recv()` function until all senders\nare dropped.\n\nThis crate aims at giving the concept an expressive name and at reducing some classes of race conditions, namely those\nwhere the original sender was not dropped before the call to `recv()`.\n\nThis version of the crate only supports synchronous code due to the dropping semantics.\n\n```shell\ncargo add rendezvous\n```\n\n## Example usage\n\n```rust\nuse std::sync::{Arc, Mutex};\nuse std::thread;\nuse std::time::Duration;\nuse rendezvous::{Rendezvous, RendezvousGuard};\n\n/// A slow worker function. Sleeps, then mutates a value.\nfn slow_worker_fn(_guard: RendezvousGuard, mut value: Arc\u003cMutex\u003cu32\u003e\u003e) {\n    thread::sleep(Duration::from_millis(400));\n    let mut value = value.lock().unwrap();\n    *value = 42;\n}\n\nfn example() {\n    // The guard that ensures synchronization across threads.\n    // Rendezvous itself acts as a guard: If not explicitly dropped, it will block the current\n    // scope until all rendezvous points are reached.\n    let rendezvous = Rendezvous::new();\n\n    // A value to mutate in a different thread.\n    let value = Arc::new(Mutex::new(0u32));\n\n    // Run the worker in a thread.\n    thread::spawn({\n        let guard = rendezvous.fork_guard();\n        let value = value.clone();\n        move || slow_worker_fn(guard, value)\n    });\n\n    // Block until the thread has finished its work.\n    rendezvous.rendezvous();\n\n    // The thread finished in time.\n    assert_eq!(*(value.lock().unwrap()), 42);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Frendezvous-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunsided%2Frendezvous-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Frendezvous-rs/lists"}