Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2007-05-25 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:51 +0300
commitc574fc0f4bba94e693b0e22f730d355b75d4f4ce (patch)
treeda4ebd90c776d508ac679d50492f29461db80be0 /CPP/7zip/Archive/Common/CoderMixer2MT.h
parenta145bfc7cf17f7bbcfae8f0064333c8ea75b455c (diff)
4.46 beta
Diffstat (limited to 'CPP/7zip/Archive/Common/CoderMixer2MT.h')
-rwxr-xr-xCPP/7zip/Archive/Common/CoderMixer2MT.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/CPP/7zip/Archive/Common/CoderMixer2MT.h b/CPP/7zip/Archive/Common/CoderMixer2MT.h
index 78d752de..67c0c8a5 100755
--- a/CPP/7zip/Archive/Common/CoderMixer2MT.h
+++ b/CPP/7zip/Archive/Common/CoderMixer2MT.h
@@ -20,9 +20,9 @@ namespace NCoderMixer2 {
struct CThreadCoderInfo: public CCoderInfo
{
- NWindows::NSynchronization::CAutoResetEvent *CompressEvent;
+ NWindows::NSynchronization::CAutoResetEvent CompressEvent;
HANDLE ExitEvent;
- NWindows::NSynchronization::CAutoResetEvent *CompressionCompletedEvent;
+ NWindows::NSynchronization::CAutoResetEvent CompressionCompletedEvent;
CObjectVector< CMyComPtr<ISequentialInStream> > InStreams;
CObjectVector< CMyComPtr<ISequentialOutStream> > OutStreams;
@@ -35,9 +35,12 @@ struct CThreadCoderInfo: public CCoderInfo
CThreadCoderInfo(UInt32 numInStreams, UInt32 numOutStreams);
void SetCoderInfo(const UInt64 **inSizes,
const UInt64 **outSizes, ICompressProgressInfo *progress);
- ~CThreadCoderInfo();
bool WaitAndCode();
- void CreateEvents();
+ HRes CreateEvents()
+ {
+ RINOK(CompressEvent.CreateIfNotCreated());
+ return CompressionCompletedEvent.CreateIfNotCreated();
+ }
};
@@ -105,14 +108,20 @@ private:
NWindows::CThread _mainThread;
NWindows::NSynchronization::CAutoResetEvent _startCompressingEvent;
- CRecordVector<HANDLE> _compressingCompletedEvents;
NWindows::NSynchronization::CAutoResetEvent _compressingFinishedEvent;
NWindows::NSynchronization::CManualResetEvent _exitEvent;
UInt32 _progressCoderIndex;
+ HRes CreateEvents()
+ {
+ RINOK(_startCompressingEvent.CreateIfNotCreated());
+ RINOK(_compressingFinishedEvent.CreateIfNotCreated());
+ return _exitEvent.CreateIfNotCreated();
+ }
+
public:
- void SetBindInfo(const CBindInfo &bindInfo);
+ HRESULT SetBindInfo(const CBindInfo &bindInfo);
};