[372] in java-interest
Thread.join()
daemon@ATHENA.MIT.EDU (Adam Smith)
Fri Jun 16 17:53:39 1995
From: Adam Smith <aws@ebt.com>
To: java-interest@java.sun.com
Date: Fri, 16 Jun 1995 17:34:18 -564912 (GMT-5650:12)
Hi all
Thanks to Jonathan Payne for his advise on my previous stream question.
On another bent, Thread.join() seems strange to me. I could not make
the source code read straight. I take it that the intention is to call
join() from one thread, on another which you want the first to wait for?
I.e.:
A and B extend Thread
A.run() {
B b = new b(args);
b.start();
// do some of A's business, but less than b will do
dum(dee, doo);
// now I want to wait for b to return before going on
b.join();
// do something which needs to be after b has finished
la(dee, da);
}
Is this how it is supposed to be used. I feel like I am missing something
and this is a dumb question or whatever, but I can't parse the source code
with my head . . . . .
Thanks,
Adam
Adam Smith
aws@ebt.com
aws@cs.brown.edu
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com