private void ProcessWorkItem(BsnesImportStreamProcessor.WorkItem workItem) { #if PROFILING var mainSpan = Markers.EnterSpan("BSNES ProcessWorkItem"); #endif // this importer call is thread-safe, so we don't need to do our own locking importer.ImportTraceLogLineBinary(workItem.Buffer, workItem.Format); #if PROFILING mainSpan.Leave(); #endif }
private void ProcessWorkItem(BsnesImportStreamProcessor.WorkItem workItem) { try { // definitely hitting lock contention. importerLock.EnterWriteLock(); importer.ImportTraceLogLineBinary(workItem.Buffer, workItem.AbridgedFormat); } finally { importerLock.ExitWriteLock(); } }