Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » dispose hook
dispose hook [message #461510] Thu, 11 January 2007 02:00 Go to next message
Kai Meder is currently offline Kai MederFriend
Messages: 11
Registered: July 2009
Junior Member
hello,

i have several threads running java-NIO, serial-connection, etc...

where may i hook an event-listener to shutdown all threads when eclipse
quits?
and is it possible to delay shutdown until all threads are properly
shutdown?

thanks,
kai
Re: dispose hook [message #461540 is a reply to message #461510] Thu, 11 January 2007 17:38 Go to previous message
Kai Meder is currently offline Kai MederFriend
Messages: 11
Registered: July 2009
Junior Member
Kai Meder schrieb:
> where may i hook an event-listener to shutdown all threads when eclipse
> quits?
> and is it possible to delay shutdown until all threads are properly
> shutdown?

i have implemented the hooking like this:
ProVisPlugin extends AbstractUIPlugin:

public void stop(BundleContext context) throws Exception {
plugin = null;

for (Facility fac : getFacilities())
fac.shutdown();

for (Facility fac : getFacilities())
fac.blockUntilShutdownComplete();

super.stop(context);
}

is this the right way to dispose objects/threads?

thanks,
kai
Previous Topic:Problems with dezerialization // regarding ObjectInputStream
Next Topic:ScrolledComposite with non-layout content-Composite
Goto Forum:
  


Current Time: Thu Apr 25 06:25:25 GMT 2024

Powered by FUDForum. Page generated in 0.05777 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top