Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is wrong here?  RSS feed

 
arun mahajan
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I was making following simple program and it is giving eror:
java.lang.IllegalMonitorStateException: current thread not owner
If I use sleep insteand of wait() method it works.
What could be the reason? Pl help.
regards,
Arun :roll:

 
arun mahajan
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh I am sorry. I found the error. Methods are not synchronized. Thanks any way.
regards,
Arun
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!