Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Terminate a long runnning command in Equinox Console
Terminate a long runnning command in Equinox Console [message #1044830] Fri, 19 April 2013 11:41 Go to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 289
Registered: July 2009
Senior Member

The title says it all, I guess Smile

We have operations that take up to several hours and output status information to the console. Did anyone implement a clever way how to check whether the user wants to terminate the long running command?

I'd be glad for any hints or ideas.

Thanks,
Marcel
Re: Terminate a long runnning command in Equinox Console [message #1045052 is a reply to message #1044830] Fri, 19 April 2013 17:48 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Am 19.04.2013 13:41, schrieb Marcel Bruch:
> Did anyone implement a clever way how to check whether the user wants to terminate the long running command?

I usually implement those long running things in an Eclipse Job. The
commands schedule such a job and keep a reference somewhere (eg. in a
registry or singleton variable). Another commands then looks up the
reference and cancels the job.

Within the job, you need to check the progress monitor for cancellation.

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Re: Terminate a long runnning command in Equinox Console [message #1045402 is a reply to message #1045052] Sat, 20 April 2013 07:18 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 289
Registered: July 2009
Senior Member

Thanks Gunnar, I thought about this but wanted to make sure that there is not option I may have missed. Looks like we are going to convert some or our commands to jobs soon.

Marcel
Re: Terminate a long runnning command in Equinox Console [message #1046651 is a reply to message #1045402] Mon, 22 April 2013 07:30 Go to previous message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Am 20.04.2013 09:18, schrieb Marcel Bruch:
> Looks like we are going to convert some or our commands to jobs soon.

Everything in the console is executed within the console thread. Thus,
the console connection executing a long running task is basically
"locked". I'm not aware of any option (such as ctrl+c on bash) to
interrupt the current thread.

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Previous Topic:Do p2 statistics support relative URL?
Next Topic:Equinox Servlet Bridge JSP Change Detection
Goto Forum:
  


Current Time: Tue Mar 19 05:39:40 GMT 2024

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

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

Back to the top