MCPcopy Create free account
hub / github.com/KLayout/klayout / update

Method update

src/db/db/dbLayout.cc:2012–2032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2010}
2011
2012void
2013Layout::update () const
2014{
2015 // NOTE: this is double checking - which is not inherently thread-safe.
2016 // However, it's so much faster, and the deal is to start multithreaded
2017 // reads with an already-updated layout and not to do reading from one thread
2018 // while writing from another. So it's worth the risk.
2019 if (! (hier_dirty () || bboxes_dirty () || prop_ids_dirty ())) {
2020 return;
2021 }
2022
2023 tl::MutexLocker locker (&lock ());
2024
2025 // We do double checking here as another thread might do the update as well.
2026 // Checking "under_constrcution" will also prevent recursion in "update".
2027 if (under_construction () || ! (hier_dirty () || bboxes_dirty () || prop_ids_dirty ())) {
2028 return;
2029 }
2030
2031 force_update_no_lock ();
2032}
2033
2034bool
2035Layout::update_needed () const

Callers 8

test_9Method · 0.95
refreshMethod · 0.45
force_update_no_lockMethod · 0.45
get_pcell_variant_asMethod · 0.45
get_pcell_variantMethod · 0.45
get_lib_proxy_asMethod · 0.45
get_lib_proxyMethod · 0.45

Calls 4

hier_dirtyFunction · 0.85
prop_ids_dirtyFunction · 0.85
lockFunction · 0.85
under_constructionFunction · 0.85

Tested by 1

test_9Method · 0.76