I tried using thread.wait(), this.wait() p.wait() etc. but i get
errors saying they are not owner of the thread. I am not sure why
the program terminates before waitFor() and goes through if waitFor
() isnt there.. please help!
For this part anyhow - to avoid the 'not owner' errors.
synchronized(thread) {
try {
thread.wait();
}
catch (InterruptedException iex) { iex.printStackTrace(); }
}
or
synchronzied(this) {
try {
this.wait();
}
catch (InterruptedException iex) { iex.printStackTrace(); } }
or
the same for p, synchronized(p) { wait stuff and so on }, if you
want to wait on it you need to own the object lock and synchronized
is what acquires it.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden