Skip to content

Improve lock handling #1028

@szokeasaurusrex

Description

@szokeasaurusrex

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

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions