Two Laptop Bag
The moose likes Threads and Synchronization and the fly likes thread  - exception handling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "thread  - exception handling" Watch "thread  - exception handling" New topic

thread - exception handling

Miran Cvenkel
Ranch Hand

Joined: Nov 23, 2010
Posts: 167

Searchable nature photo gallery:
Stephan van Hulst

Joined: Sep 20, 2010
Posts: 3986

Well, it depends what you want to do when an exception occurs. If in thread 2 you want to notify a user interface of e-mails that didn't get sent, and the user interface is part of thread 1's context, then you should simply pass the user interface to thread 2 when you start it, and let thread 2 deal with the user interface itself.

The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: thread - exception handling
It's not a secret anymore!