Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: creating 2 threads at the same time Pin
#realJSOP27-Mar-02 0:08
professional#realJSOP27-Mar-02 0:08 
GeneralRe: creating 2 threads at the same time Pin
Neville Franks31-Mar-02 0:30
Neville Franks31-Mar-02 0:30 
GeneralRe: creating 2 threads at the same time Pin
RalfPeter26-Mar-02 12:31
RalfPeter26-Mar-02 12:31 
GeneralRe: creating 2 threads at the same time Pin
Neville Franks31-Mar-02 0:32
Neville Franks31-Mar-02 0:32 
Generalvdrozdenko: SHBrowseForFolder Pin
peterchen26-Mar-02 9:56
peterchen26-Mar-02 9:56 
QuestionWhy doesn't work???? Pin
ChiYung26-Mar-02 9:16
ChiYung26-Mar-02 9:16 
AnswerRe: Why doesn't work???? Pin
Tim Smith26-Mar-02 9:38
Tim Smith26-Mar-02 9:38 
GeneralRe: Why doesn't work???? Pin
ChiYung26-Mar-02 9:41
ChiYung26-Mar-02 9:41 
So i change the code liked this:

while (!Scheduler_MSG.empty())
{
Scheduler = Scheduler_MSG.begin();
AfxMessageBox("Update start");
if (((*Scheduler).msg == ABORT_MSG) || ((*Scheduler).msg == COMMIT_MSG))
{
//AfxMessageBox("In the IF loop");
std::vector <WAITQUEUE_STRUCT>::iterator Iter;

for (int i=0; i<NumOfDBObject; i++)
{

if (LockTable[i].CurrentThread == (*Scheduler).pThread)
{
LockTable[i].CurrentThread = NULL;
LockTable[i].CurrentLock = CurrentNoLock;
}

if (!LockTable[i].WaitQueue.empty())
{
for ( Iter = LockTable[i].WaitQueue.begin() ; Iter != LockTable[i].WaitQueue.end() ; Iter++ )
{
if ((*Iter).pThread == (*Scheduler).pThread)
{
LockTable[i].WaitQueue.erase(Iter); <=====Something wrong here...
}
}
}
}

//AfxMessageBox("Before erase");
Scheduler_MSG.erase(Scheduler); //Finished and erase this message
//AfxMessageBox("After erase");
}

}

I found something wrong in the statement LockTable[i].WaitQueue.erase(Iter); (stated)... when i disable this line.....it's no terminate message.........how to change it?

Thanks!!!!!
GeneralRe: Why doesn't work???? Pin
Tim Smith26-Mar-02 10:07
Tim Smith26-Mar-02 10:07 
GeneralRe: Why doesn't work???? Pin
26-Mar-02 16:21
suss26-Mar-02 16:21 
Generalcombo box question Pin
26-Mar-02 8:57
suss26-Mar-02 8:57 
GeneralRe: combo box question Pin
Ben Burnett26-Mar-02 11:04
Ben Burnett26-Mar-02 11:04 
GeneralLinker optimizations & RuntimeClass info Pin
Christopher Duncan26-Mar-02 8:52
Christopher Duncan26-Mar-02 8:52 
GeneralRe: Linker optimizations & RuntimeClass info Pin
Tim Smith26-Mar-02 9:06
Tim Smith26-Mar-02 9:06 
GeneralRe: Linker optimizations & RuntimeClass info Pin
Christopher Duncan26-Mar-02 9:36
Christopher Duncan26-Mar-02 9:36 
GeneralRe: Linker optimizations & RuntimeClass info Pin
AndyC11-Jul-02 2:46
AndyC11-Jul-02 2:46 
GeneralRe: Linker optimizations & RuntimeClass info Pin
Joaquín M López Muñoz26-Mar-02 9:37
Joaquín M López Muñoz26-Mar-02 9:37 
GeneralRe: Linker optimizations & RuntimeClass info Pin
Christopher Duncan26-Mar-02 9:34
Christopher Duncan26-Mar-02 9:34 
GeneralRe: Linker optimizations & RuntimeClass info Pin
Joaquín M López Muñoz26-Mar-02 9:57
Joaquín M López Muñoz26-Mar-02 9:57 
GeneralRe: Linker optimizations & RuntimeClass info Pin
Tim Smith26-Mar-02 9:58
Tim Smith26-Mar-02 9:58 
Generalwhy don't my column headers show up in my dialog :confused: Pin
26-Mar-02 8:44
suss26-Mar-02 8:44 
GeneralRe: why don't my column headers show up in my dialog :confused: Pin
Joaquín M López Muñoz26-Mar-02 9:05
Joaquín M López Muñoz26-Mar-02 9:05 
GeneralMultithreading, DLL's and COM Pin
#realJSOP26-Mar-02 8:12
professional#realJSOP26-Mar-02 8:12 
GeneralRe: Multithreading, DLL's and COM Pin
Tim Smith26-Mar-02 8:23
Tim Smith26-Mar-02 8:23 
GeneralRe: Multithreading, DLL's and COM Pin
#realJSOP26-Mar-02 10:02
professional#realJSOP26-Mar-02 10:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.