This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Throwing c++ exception across threads


On 25 April 2007 15:20, Eric Lilja wrote:

> When the user of the program connects to an irc server a thread is
> spawned that handles communication with the irc server. Any messages are
> displayed in an editbox. If a severe error occurs, an exception is
> thrown. Will there be any problems if I catch these exceptions in the
> main thread? The things is that the connection code may cause an
> exception and I want to run that in the connection thread so the UI
> doesn't freeze while it's waiting for an connection attempt to time-out
> for instance.

  How exactly do you propose to "throw an exception across threads" anyway?
You can't spawn a thread inside a try-catch block and expect that block to
apply to the new thread....

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]