Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » dispose hook
dispose hook [message #461510] Wed, 10 January 2007 21:00 Go to next message
Eclipse UserFriend
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 12:38 Go to previous message
Eclipse UserFriend
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: Sat Mar 15 01:56:10 EDT 2025

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

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

Back to the top