JDK-4414812 : Timeout cannot be detected in threads using wait()
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-02-13
  • Updated: 2001-10-17
  • Resolved: 2001-10-17
Related Reports
Duplicate :  
Description

Name: boT120536			Date: 02/13/2001


C:\>java -version
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)

It is impossible to know if the return from a wait() call is because of a
timeout or another thread calling notify() or notifyAll().

If a return value were provided, for example a boolean, to indicate that a
timeout had occured rather than a thread notification, timeouts could be
coded.  As the only change is a return parameter, current code would continue
to function.  Now, calls to System.currentTimeMillis() are required which may
not reflect the true situation due to thread scheduling.
(Review ID: 116771) 
======================================================================

Comments
EVALUATION Duplicate of 4365973 which is probably a duplicate of 4027382. -- iag@sfbay 2001-10-17
17-10-2001