public void Compress(string filePath, string archivePath) { archivingLock.EnterWriteLock(); var thread = new Thread(() => CompressFile(filePath, archivePath)); thread.Start(); archive = new Archive { Thread = thread, Status = ResultState.Processing }; archivingLock.ExitWriteLock(); }
public Archiver() { archive = new Archive(); isAborted = false; isError = false; isErrorShow = false; archivingLock = new ReaderWriterLockSlim(); isCompressionFileDone = false; isAllFramesReaded = false; compressionFramesCount = 0; uncompressedCache = new List<CompressFrame>(); compressLock = new ReaderWriterLockSlim(); }