[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: Activator.stop() is not called at shutdown of OS (Windows XP)
|
"Ag " <agop@xxxxxxxxx> wrote in message
news:03fadef6caecaecf0ab5a68e8d21a259$1@xxxxxxxxxxxxxxxxxx
> In our situation, in case of power loss, UPS gives to Windows XP command
> on shutdown.
Not if the user trips over the power cord between the computer and the UPS.
Not if the user forcibly kills the task. Not if the power supply dies.
There are always termination events that cannot be processed.
> And how in this case it is correct to finish a plugin?
What is the action that you need to take on plug-in shutdown? Why can it
not be done earlier? For instance, if you are serializing out some state,
can it be done at the time the state changed (perhaps on a background
thread), rather than waiting till shutdown?
By the way, I'm not saying that shutdown() should not be getting called when
the OS shuts down - perhaps there's a bug there or perhaps that's
intentional, I don't know. I'm just saying that you can't catch all
possible shutdown events on all platforms in all situations, so if your code
depends on that, I think your code cannot be reliable. So if it were me, I
would prefer a design that didn't depend on catching shutdown events at all.
But since I don't know what it is you're trying to do, I don't know how much
of a concern this kind of reliability is for you.