|
NOTA: La traducción de esta documentación es un esfuerzo personal y voluntario, no es un documento oficial de Sun Microsystems
ni Oracle ni está patrocinado por ninguna de estas empresas. Los documentos originales (en inglés) están disponibles en:
http://java.sun.com/docs/books/tutorial/.
Dirija cualquier comentario, petición, felicitación, etc. a tutorialesjava_@RROBA_codexion.com. |
Si desea ayudar a mantener en funcionamiento esta web, colaborar con la traducción de estos documentos o necesita que se traduzca algĂșn capĂtulo en concreto puede realizar una donación directa mediante Paypal:
|
Thejoinmethod allows one thread to wait for the completion of another. Iftis aThreadobject whose thread is currently executing,causes the current thread to pause execution untilt.join();t's thread terminates. Overloads ofjoinallow the programmer to specify a waiting period. However, as withsleep,joinis dependent on the OS for timing, so you should not assume thatjoinwill wait exactly as long as you specify.Like
sleep,joinresponds to an interrupt by exiting with anInterruptedException.