JDK-4365973 : want Object.wait(timeout) that throws exception on timeout
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.2.1,1.3.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2000-08-25
  • Updated: 2002-04-27
  • Resolved: 2002-04-27
Related Reports
Duplicate :  
Duplicate :  
Description

Name: skT45625			Date: 08/25/2000


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

Object.wait( long timeout )

is relatively useless. That's because you can't differentiate whether or not
you timed out. This causes this method to be of no real value.

Please, please, add a

Object.wait( long timeout, boolean throwOnTimeout ) throws TimeoutException
(Review ID: 108942) 
======================================================================

Comments
WORK AROUND Name: skT45625 Date: 08/25/2000 none that I know, without writting some completely hideous code. ======================================================================
11-06-2004

EVALUATION Note that this functionality will be provided in the condition variables upcoming concurrency utilities framework (JSR-166). ###@###.### 2002-04-26
26-04-2002