[5506] in java-interest
threads
daemon@ATHENA.MIT.EDU (Chris Gokey)
Wed Feb 14 19:16:14 1996
Date: Wed, 14 Feb 1996 17:41:35 -0500
From: ra104@cosc.bsu.umd.edu (Chris Gokey)
To: java-interest@java.sun.com
Cc: ra104@cosc.bsu.umd.edu
Help!
I need some advice on threads for a application I'm developing....
When the application is started it will first spawn
a thread that will be called the Screen Manager (SM).
The SM will be responsible for bringing up the correct
windows for the user. Each window will be a thread itself
so when they are instantiated they will be running
simultaneously with the SM.
When one of these windows is spawned the SM needs go to
sleep (this way it is not taking up any process time). It
will wake up only in two circumstances. 1) the user has
finished with the current screen and hits a button stating
that he wants to some action to be taken. 2) a messge is received
via socket and the SM needs to take some action.
I know that I can use Thread.suspend and Thread.resume to
achieve the above. But each thread is in a different class and
the scope of the variable declared as a Thread is
only limited to that class. If I want one thread to wake up
another thread, how do I wake it up if it is in a different class?
Is the only way to achieve this is to pass the Calling Thread
into the other thread?? or is there another way???
Obviously, I'm new to threads and my terminology/design may be off... So
correct me where needed?
Thanks,
Chris Gokey
ra104@cosc.bsu.umd.edu
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com