Project

General

Profile

Actions

Feature #7086

open

ConditionVariable#wait has meaningless return value

Added by rklemme (Robert Klemme) almost 9 years ago. Updated over 3 years ago.

Status:
Assigned
Priority:
Normal
Target version:
-
[ruby-core:47734]

Description

I consider this an API bug: when invoked with a timeout value the caller cannot distinguish from the return value whether the condition has been signaled or the time has run out. Consider how Java does it: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html#await(long,%20java.util.concurrent.TimeUnit) and http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html#awaitUntil(java.util.Date)

There's another issue exhibited through the script but I will create a separate ticket for this.


Files

timeout-rk.rb (2.51 KB) timeout-rk.rb Program which tests a few alternative timeout implementations rklemme (Robert Klemme), 09/30/2012 12:14 AM
Actions

Also available in: Atom PDF