commit 2025-10-04 14:32 edit a bit ZCppMain/ZCProcess.H
This commit is contained in:
@ -1001,12 +1001,12 @@ namespace ZNsMain
|
||||
typename TDataArg =const TSyncData& ,
|
||||
typename TSyncEasy=ZNsMain::ZCCriticSectEasy
|
||||
>
|
||||
class ZtCSyncObj ////////////////////////////////*/
|
||||
class ZtCSyncObj /////////////////////////////////////*/
|
||||
|
||||
|
||||
/*/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
■ TMutexCondData 클래스를 상속하여 대기상태에 관련된 2 개의 bool 멤버를 갖는다.
|
||||
■ TMutexCondData 클래스를 상속하여 대기 상태에 관련된 2 개의 bool 멤버를 갖는다.
|
||||
|
||||
■ TMutexCondData 클래스 타입은 mutex 와 조건변수를 가지고 있어야 한다.
|
||||
|
||||
@ -1020,14 +1020,14 @@ namespace ZNsMain
|
||||
typedef TMutexCondData TypeData ;
|
||||
typedef TMutexCondData CMutexCondData;
|
||||
protected:
|
||||
bool mb_MustWait ;
|
||||
bool mb_DoWaitCond;
|
||||
bool mb_MustWait;
|
||||
bool mb_WaitCond;
|
||||
public :
|
||||
|
||||
ZtCMutexCondDataVar()
|
||||
{
|
||||
mb_MustWait =false;
|
||||
mb_DoWaitCond=false;
|
||||
mb_MustWait= false;
|
||||
mb_WaitCond= false;
|
||||
}/*
|
||||
ZtCMutexCondDataVar()*/
|
||||
|
||||
@ -1039,9 +1039,9 @@ namespace ZNsMain
|
||||
{
|
||||
if(this->mb_MustWait==true)
|
||||
{
|
||||
this->mb_DoWaitCond=true ;
|
||||
this->mb_WaitCond=true ;
|
||||
this->TMutexCondData::WaitCond();
|
||||
this->mb_DoWaitCond=false;
|
||||
this->mb_WaitCond=false;
|
||||
}/*
|
||||
if(this->mb_MustWait==true)*/
|
||||
}
|
||||
@ -1064,22 +1064,22 @@ namespace ZNsMain
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
else if(this->mb_DoWaitCond==true)
|
||||
else if(this->mb_WaitCond==true)
|
||||
{
|
||||
// 이때는 쓰레드가 잠자고 있다면 깨워야 한다.
|
||||
|
||||
this->TMutexCondData::WakeCond();
|
||||
this->mb_DoWaitCond=false;
|
||||
this->mb_WaitCond=false;
|
||||
}/*
|
||||
else if(this->mb_DoWaitCond==true)*/
|
||||
else if(this->mb_WaitCond==true)*/
|
||||
}
|
||||
this->TMutexCondData::UnLock();
|
||||
}/*
|
||||
void SetMustWaitBool(bool AB_MustWait)*/
|
||||
|
||||
|
||||
bool MustWait () const{return mb_MustWait ;}
|
||||
bool DoWaitCond() const{return mb_DoWaitCond;}
|
||||
bool MustWait () const{return mb_MustWait;}
|
||||
bool DoWaitCond() const{return mb_WaitCond;}
|
||||
|
||||
public:
|
||||
};/*
|
||||
|
Reference in New Issue
Block a user