{"id":17658642,"url":"https://github.com/ruuda/thread-id","last_synced_at":"2025-04-05T21:11:28.134Z","repository":{"id":53554023,"uuid":"53741449","full_name":"ruuda/thread-id","owner":"ruuda","description":"Get a unique thread ID in Rust","archived":false,"fork":false,"pushed_at":"2023-12-27T07:36:53.000Z","size":624,"stargazers_count":41,"open_issues_count":2,"forks_count":21,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T09:24:44.225Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruuda.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","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":"2016-03-12T16:29:30.000Z","updated_at":"2024-06-18T21:39:10.488Z","dependencies_parsed_at":"2024-06-18T21:53:05.094Z","dependency_job_id":null,"html_url":"https://github.com/ruuda/thread-id","commit_stats":{"total_commits":50,"total_committers":7,"mean_commits":7.142857142857143,"dds":"0.19999999999999996","last_synced_commit":"e80a25006e559bc755be95675a3af380dd3f3f01"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fthread-id","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fthread-id/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fthread-id/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fthread-id/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruuda","download_url":"https://codeload.github.com/ruuda/thread-id/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399887,"owners_count":20932880,"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":[],"created_at":"2024-10-23T15:27:47.830Z","updated_at":"2025-04-05T21:11:28.090Z","avatar_url":"https://github.com/ruuda.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Thread-ID\n=========\nGet a unique ID for the current thread in Rust.\n\n[![Crates.io version][crate-img]][crate]\n[![Documentation][docs-img]][docs]\n\nFor diagnostics and debugging it can often be useful to get an ID that is\ndifferent for every thread. [Until Rust 1.14][stdlib-pr], the standard library\ndid not expose a way to do that, hence this crate.\n\nExample\n-------\n\n```rust\nuse std::thread;\nuse thread_id;\n\nlet handle = thread::spawn(move || {\n    println!(\"spawned thread has id {}\", thread_id::get());\n});\n\nprintln!(\"main thread has id {}\", thread_id::get());\n\nhandle.join().unwrap();\n```\n\nThis will print two different numbers.\n\nLicense\n-------\nThread-ID is licensed under either the [Apache 2.0 license][apache2], or the\n[MIT license][mit], at your option. It may be used in free software as well as\nclosed-source applications, both for commercial and non-commercial use under the\nconditions given in the license.\n\nContributing\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\n[crate-img]: https://img.shields.io/crates/v/thread-id.svg\n[crate]:     https://crates.io/crates/thread-id\n[docs-img]:  https://img.shields.io/badge/docs-online-blue.svg\n[docs]:      https://docs.rs/thread-id\n[stdlib-pr]: https://github.com/rust-lang/rust/pull/36341\n[apache2]:   https://www.apache.org/licenses/LICENSE-2.0\n[mit]:       https://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Fthread-id","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruuda%2Fthread-id","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Fthread-id/lists"}