internal void CloneFrom(PDFDocumentCitationManager other) { // prevent deadlock due to possible incorrect use of this API: if (other != this) { // Utilities.LockPerfTimer l1_clk = Utilities.LockPerfChecker.Start(); lock (citations_lock) { // l1_clk.LockPerfTimerStop(); // the other PDFCitMgr instance has its own lock, so without // a copy through `other.Citations_LOCKED` this code would // be very much thread-UNSAFE! Citations_RAW.AddRange(other.Citations_LOCKED); WriteToDisk(pdf_document, Citations_RAW); } } }
internal void CloneFrom(PDFDocumentCitationManager other) { this.Citations.AddRange(other.Citations); WriteToDisk(pdf_document, Citations); }