Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Richard Torres   on May 28 In Java Category.

  
Question Answered By: Erma Henry   on May 28

Well. I read your code. The problem  is that you depend on how Java chooses
one of waiting threads (to enter monitor) when it receives a notify()
signal; The thing thats is prohibited in Java.

Its is interesting that on JDK 1.5 is seems to work correctly as is (i.e.
increment/decrements by 1) but in JDK 1.6 step changes to 2. This
clarifies that they have different thread/monitor entrance policy.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Problem in incrementing Or get search suggestion and latest updates.


Tagged: