mirror of https://github.com/KLayout/klayout.git
First steps towards fix: locking layout while recursive shape iterator is alive.
This commit is contained in:
parent
a983603dbc
commit
c1757c472e
|
|
@ -67,6 +67,7 @@ RecursiveShapeIterator &RecursiveShapeIterator::operator= (const RecursiveShapeI
|
||||||
|
|
||||||
m_box_convert = d.m_box_convert;
|
m_box_convert = d.m_box_convert;
|
||||||
|
|
||||||
|
m_locker = d.m_locker;
|
||||||
m_inst = d.m_inst;
|
m_inst = d.m_inst;
|
||||||
m_inst_array = d.m_inst_array;
|
m_inst_array = d.m_inst_array;
|
||||||
m_empty_cells_cache = d.m_empty_cells_cache;
|
m_empty_cells_cache = d.m_empty_cells_cache;
|
||||||
|
|
@ -451,6 +452,8 @@ RecursiveShapeIterator::validate (RecursiveShapeReceiver *receiver) const
|
||||||
m_needs_reinit = false;
|
m_needs_reinit = false;
|
||||||
|
|
||||||
// re-initialize
|
// re-initialize
|
||||||
|
m_locker = db::LayoutLocker ();
|
||||||
|
|
||||||
mp_cell = mp_top_cell;
|
mp_cell = mp_top_cell;
|
||||||
m_trans_stack.clear ();
|
m_trans_stack.clear ();
|
||||||
m_inst_iterators.clear ();
|
m_inst_iterators.clear ();
|
||||||
|
|
@ -502,6 +505,10 @@ RecursiveShapeIterator::validate (RecursiveShapeReceiver *receiver) const
|
||||||
new_cell (receiver);
|
new_cell (receiver);
|
||||||
next_shape (receiver);
|
next_shape (receiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mp_layout) {
|
||||||
|
m_locker = db::LayoutLocker (const_cast<db::Layout *> (mp_layout.get ()), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -854,6 +854,7 @@ private:
|
||||||
std::unique_ptr<region_type> mp_complex_region;
|
std::unique_ptr<region_type> mp_complex_region;
|
||||||
db::box_convert<db::CellInst> m_box_convert;
|
db::box_convert<db::CellInst> m_box_convert;
|
||||||
|
|
||||||
|
mutable db::LayoutLocker m_locker;
|
||||||
mutable inst_iterator m_inst;
|
mutable inst_iterator m_inst;
|
||||||
mutable inst_array_iterator m_inst_array;
|
mutable inst_array_iterator m_inst_array;
|
||||||
mutable std::map<db::cell_index_type, bool> m_empty_cells_cache;
|
mutable std::map<db::cell_index_type, bool> m_empty_cells_cache;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue