From bea707a9df6cf026b495939ad94472197c6be4ba Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 25 Oct 2024 00:40:42 +0200 Subject: [PATCH] Releasing the lock when the iterator is at end - otherwise a finished iterator could still block the layout (potential Ruby GC issue) --- src/db/db/dbRecursiveShapeIterator.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/db/db/dbRecursiveShapeIterator.cc b/src/db/db/dbRecursiveShapeIterator.cc index feff72f32..e3872f485 100644 --- a/src/db/db/dbRecursiveShapeIterator.cc +++ b/src/db/db/dbRecursiveShapeIterator.cc @@ -695,6 +695,12 @@ RecursiveShapeIterator::next (RecursiveShapeReceiver *receiver) next_shape (receiver); } + if (at_end ()) { + // release the layout lock if at end - this way, the shape iterator can be + // held further, without blocking the layout. + m_locker = db::LayoutLocker (); + } + } }