Merge remote-tracking branch 'origin/GP-1887_d-millar_temp_fix_for_thread_lifespans--SQUASHED' into patch

This commit is contained in:
Ryan Kurtz 2022-04-05 15:57:35 -04:00
commit e9797d4526

View file

@ -256,7 +256,13 @@ public class TraceObjectManager {
recorder.createSnapshot(traceThread + " started", traceThread, null); recorder.createSnapshot(traceThread + " started", traceThread, null);
try (UndoableTransaction tid = try (UndoableTransaction tid =
UndoableTransaction.start(recorder.getTrace(), "Adjust thread creation", true)) { UndoableTransaction.start(recorder.getTrace(), "Adjust thread creation", true)) {
traceThread.setCreationSnap(recorder.getSnap()); long existing = traceThread.getCreationSnap();
if (existing == Long.MIN_VALUE) {
traceThread.setCreationSnap(recorder.getSnap());
}
else {
traceThread.setDestructionSnap(Long.MAX_VALUE);
}
} }
catch (DuplicateNameException e) { catch (DuplicateNameException e) {
throw new AssertionError(e); // Should be shrinking throw new AssertionError(e); // Should be shrinking