getsentry / getsentry/sentry-rust

Improve lock handling

Open
#1,028 1 comment 1 reaction 1 assignee Claimed by @szokeasaurusrex View on GitHub
Improvement Rust
Dominant language
Rust
Stars
752
Forks
190
Avg merge
1h 21m
Merged PRs (30d)
5

Description

When we aquire mutex/rwlocks in the SDK, we typically unwrap them. This would cause a panic if the lock is "poisoned", which occurs when the thread that was holding the lock panics.

I think that, at least in some cases, we can gracefully handle such a scenario without panicking, and we can just log a message instead. For example, when acquiring the `Batcher` locks (for logs and metrics), we could just log a message, then replace the existing batcher with a new one

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.