Click here to Skip to main content
15,909,051 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I want to recommend an application Pin
21-Nov-01 3:48
suss21-Nov-01 3:48 
QuestionHow to draw a part of Desktop Pin
21-Nov-01 1:38
suss21-Nov-01 1:38 
AnswerRe: How to draw a part of Desktop Pin
Roger Allen21-Nov-01 7:29
Roger Allen21-Nov-01 7:29 
GeneralCWinApp::OnIdle in Dll - is NOT called Pin
DataPrasad21-Nov-01 1:05
DataPrasad21-Nov-01 1:05 
GeneralRe: CWinApp::OnIdle in Dll - is NOT called Pin
Michael Dunn21-Nov-01 6:20
sitebuilderMichael Dunn21-Nov-01 6:20 
GeneralDialog buttons Pin
et20-Nov-01 23:17
et20-Nov-01 23:17 
GeneralRe: Dialog buttons Pin
Christian Graus21-Nov-01 0:39
protectorChristian Graus21-Nov-01 0:39 
GeneralScope of try...catch constructions (over threads) Pin
EiSl20-Nov-01 21:42
EiSl20-Nov-01 21:42 
Hello all,

I was wondering about the scope of try...catch constructions over threads.

An example (very simplified example of existing code, where the Main_thread acts like a scheduler and the Worker_Threads are the 'processes'):

Main_thread
{
  try {
    // Launch some Worker_threads
  }
  catch( ... ) {
    // Do some actions
  }
}
 
Worker_thread
{
  try {
    // The executing code, which might also execute
    // the throw-function.
  }
  catch( condition ) {
    // Do some actions, but continue operation
  }
  catch( ... ) {
    // Do some actions
    throw( something ); // should be catched in Main_Thread
  }  
}


Is it possible to (or 'how to') catch the last throw from the Worker_thread into the Main_thread?
What is the nice way to do this?

Thanks in advance,

EiSl
GeneralRe: Scope of try...catch constructions (over threads) Pin
Joaquín M López Muñoz20-Nov-01 23:11
Joaquín M López Muñoz20-Nov-01 23:11 
GeneralRe: Scope of try...catch constructions (over threads) Pin
Rui Lopes20-Nov-01 23:15
Rui Lopes20-Nov-01 23:15 
QuestionCFindFile? Pin
20-Nov-01 20:57
suss20-Nov-01 20:57 
AnswerRe: CFindFile? Pin
Rassman20-Nov-01 22:03
Rassman20-Nov-01 22:03 
GeneralOwndraw scrollbars question Pin
Osykin Roman20-Nov-01 20:40
Osykin Roman20-Nov-01 20:40 
GeneralRe: Owndraw scrollbars question Pin
moliate21-Nov-01 5:42
moliate21-Nov-01 5:42 
GeneralRe: Owndraw scrollbars question Pin
Osykin Roman21-Nov-01 11:39
Osykin Roman21-Nov-01 11:39 
GeneralClock display Pin
smeckenfill20-Nov-01 19:34
smeckenfill20-Nov-01 19:34 
GeneralRe: Clock display Pin
Member 2362220-Nov-01 19:53
Member 2362220-Nov-01 19:53 
GeneralRe: Clock display Pin
kakuni27-Nov-01 9:11
kakuni27-Nov-01 9:11 
GeneralRe: Clock display Pin
Andrew Peace21-Nov-01 14:44
Andrew Peace21-Nov-01 14:44 
GeneralRe: Clock display Pin
kakuni27-Nov-01 9:14
kakuni27-Nov-01 9:14 
GeneralCEdit - A Simple Question Pin
Xavier Shay20-Nov-01 19:20
Xavier Shay20-Nov-01 19:20 
GeneralRe: CEdit - A Simple Question Pin
Fredrik Skog3-Dec-01 22:31
Fredrik Skog3-Dec-01 22:31 
Generaldifferent outlook on different pc. Pin
zecodela20-Nov-01 16:41
zecodela20-Nov-01 16:41 
GeneralRe: different outlook on different pc. Pin
Alvaro Mendez20-Nov-01 17:59
Alvaro Mendez20-Nov-01 17:59 
GeneralCode bloat! Pin
Todd Smith20-Nov-01 14:12
Todd Smith20-Nov-01 14:12 

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.