Commit Graph

2 Commits

Author SHA1 Message Date
Chris Vest
f460c732d0 Make LifecycleTracer thread-safe
The real world may expose the buffers to concurrent accesses even when this is not supposed to be supported.
2021-03-09 11:57:49 +01:00
Chris Vest
0867f99be1 Add LifecycleTracer to help debug lifecycle/ownership issues
Motivation:
With reference counting it can be difficult to keep track of ownership and references.
When bugs arise in this area, it's good to get help from some tooling.

Modification:
Add a LifecycleTracer which records lifecycle changes.
This information can be attached to any lifecycle/ownership exceptions as suppressed exceptions.
The tracing is off by default, unless assertions are enabled.

Result:
It's now easier to debug reference counting/lifecycle/ownership issues.
2021-03-05 16:32:10 +01:00