Example #1
0
void CMultiXProcessAlertableObject::OnTimer(CMultiXTimer *Timer)
{
    CMultiXProcessTimer	*T	=	(CMultiXProcessTimer	*)Timer;
    switch(T->TimerCode())
    {
    case	CMultiXProcessTimer::SendMsgTimerCode	:
        CMultiXAppMsg	*Msg	=	T->MsgID().GetObject();
        if(Msg)
        {
            OwnerProcess()->m_NonResponding	=	true;
            Msg->SetError(MsgErrTimeout);
            T->MsgID().Owner()->CancelMsg(T->MsgID(),true);
        }
        break;
    }
}
Example #2
0
void CMultiXProcess::EnableSender(bool bValue)
{
    if(SenderEnabled()	==	bValue)
        return;

    m_bSenderEnabled	=	bValue;

    if(!SenderEnabled())
    {
        m_SupportedMsgs.clear();
        CMultiXAppMsg	*Msg;
        m_pOutQueue->Lock();
        while(Msg	=	m_pOutQueue->GetFirst())
        {
            Msg->SetError(MsgErrCanceled);
            CancelMsg(Msg->ID(),false);
        }
    }
}