> Because a Thread can only be started once. Read the
> Javadoc.
>
> --
> Eric.Sos...@sun.com
but can we stop and then start it again.any work around for it
Thomas Schodt - 07 Mar 2007 07:23 GMT
>> Because a Thread can only be started once. Read the
>> Javadoc.
[quoted text clipped - 3 lines]
>
> but can we stop and then start it again.any work around for it
Tell us what you are trying to accomplish.
Is there a reason for not using new Thread() again?
[A workaround would be; don't allow the thread to complete in the first
place.]
Patricia Shanahan - 07 Mar 2007 09:47 GMT
>> Because a Thread can only be started once. Read the
>> Javadoc.
[quoted text clipped - 3 lines]
>
> but can we stop and then start it again.any work around for it
You have two options:
1. Use some form of coordination other than join, so that each thread
does not terminate until it has done all its work.
2. Create new threads to do the post-join tasks.
Patricia