I have a problem with threads: My java client contains 2 threads which
call to 2 methods. First thread calls method "x" into while(true) but when
second thread calls method "y", first thread must wait. When second thread
finish method "y" must notify and first thread will awake.

But I receive this message:
java.lang.IllegalMonitorStateException: current thread not owner
        at Cliente.enviarPeticion(Cliente.java:141)
        at Cliente.run(Cliente.java:91)
        at java.lang.Thread.run(Thread.java)

Why? thanks.

Carlos Alberto Roman Zamitiz
Departamento de Ingenieria en Computacion, Facultad de Ingenieria UNAM
[EMAIL PROTECTED]

Reply via email to