Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Non-responding thread
Non-responding thread [message #75244] Mon, 16 June 2003 07:14 Go to next message
Eclipse UserFriend
I'm constructing a new perspective which will communicate with an external
program. I have made some buttons on the toolbar and these are working as
expected: I do receive messages from the external program. But as I open
an editor I can't receive messages from the external program anymore. The
thread where the messages are received in is not responsive anymore.

Where can I best start threads that will stay alive as long as the
perspective or Eclipse is running? At this moment I start the thread in
the perspective constructor.

public PerspectiveFactory() throws IOException {
bridge = new Bridge(this);
super();
Thread t = new Thread(bridge);
t.run();
}

Bridge is a class that implements the Runnable class.

Thanks in advance.
Re: Non-responding thread [message #77011 is a reply to message #75244] Tue, 17 June 2003 18:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

It's your thread, so how can anyone tell you why it's not responding??
If you create your own thread, "Eclipse" will never know about it, so it
will stick around until it finishes its run method. A good place to
start threads is in your Plugin.startup() method.
--


Taeke Kooiker wrote:
> I'm constructing a new perspective which will communicate with an external
> program. I have made some buttons on the toolbar and these are working as
> expected: I do receive messages from the external program. But as I open
> an editor I can't receive messages from the external program anymore. The
> thread where the messages are received in is not responsive anymore.
>
> Where can I best start threads that will stay alive as long as the
> perspective or Eclipse is running? At this moment I start the thread in
> the perspective constructor.
>
> public PerspectiveFactory() throws IOException {
> bridge = new Bridge(this);
> super();
> Thread t = new Thread(bridge);
> t.run();
> }
>
> Bridge is a class that implements the Runnable class.
>
> Thanks in advance.
>
Re: Non-responding thread [message #81248 is a reply to message #77011] Tue, 24 June 2003 05:26 Go to previous message
Eclipse UserFriend
It could be Eclipse related: while the first thread is working correctly,
after starting the second thread it doesn't work anymore. Both threads are
non-UI threads and the classes implement Runnable. The threads are started
with

Thread t1 = new Thread(Class1 which implements runnable);
t1.start();
Thread t2 = new Thread(Class2 which implements runnable);
t2.start();

Hereafter only t2 is responding. Not starting t2 makes t1 responding, so
t1 does work.

John Arthorne wrote:

> It's your thread, so how can anyone tell you why it's not responding??
> If you create your own thread, "Eclipse" will never know about it, so it
> will stick around until it finishes its run method. A good place to
> start threads is in your Plugin.startup() method.
> --
Previous Topic:How does eclipse launch external tools without windows console apearing?
Next Topic:[ANN] Eclipse profiler plugin, 0.5.26
Goto Forum:
  


Current Time: Sun Jun 22 08:29:31 EDT 2025

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

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

Back to the top