Mo :ferris: :tux: on Nostr: Did you know that spawning a thread can fail? Rust allows you to handle such an OS ...
Published at
2024-09-06 16:46:51Event JSON
{
"id": "48a2518b5d1a4d659a8a73686762c7fe7182334c505fa1fa68da6a02b6d66225",
"pubkey": "979383f8767c5d795fcad86f82dc7b38b384c1a473710c433014dc2c0fb0e359",
"created_at": 1725641211,
"kind": 1,
"tags": [
[
"proxy",
"https://fosstodon.org/users/mo8it/statuses/113091622417143400",
"activitypub"
]
],
"content": "Did you know that spawning a thread can fail?\n\nRust allows you to handle such an OS error when using `thread::Builder::new().spawn(…)`\n\nhttps://doc.rust-lang.org/stable/std/thread/struct.Builder.html#method.spawn\n\n`thread::spawn` is just a convenient function which panics on such an error\n\nhttps://doc.rust-lang.org/stable/std/thread/fn.spawn.html\n\nIf you are pedantic, you could add `std::thread::spawn` and `std::thread::Scope::spawn` to the `disallowed_methods` in your Clippy config file clippy.toml:\n\nhttps://doc.rust-lang.org/stable/clippy/configuration.html",
"sig": "1962b4271f48d550829fc651d1338eec33798e4c6dbed825074644a76169e816877c454ef89b5e52dfd5a77bd491241793ff051e23d8eae76968738901b57f52"
}