Skip to content
Snippets Groups Projects
Verified Commit f6f46f69 authored by Eduardo Trujillo's avatar Eduardo Trujillo
Browse files

fix(thread): Don't unwrap when notifying parent

parent d9768751
No related tags found
No related merge requests found
Pipeline #301 passed
......@@ -119,7 +119,10 @@ where
let mut ended = ended.write().unwrap();
*ended = true;
notify_sender.send(std::thread::current()).unwrap();
// Try to notify. This is a best-effort approach since the receiver may
// be already deallocated in some scenarios (e.g. The application is
// terminating).
let _ = notify_sender.send(std::thread::current());
result
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment