Project

General

Profile

ActionsLike0

Feature #7086

open

ConditionVariable#wait has meaningless return value

Added by rklemme (Robert Klemme) over 12 years ago. Updated over 7 years ago.

Status:
Assigned
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
#4

Updated by mame (Yusuke Endoh) over 12 years ago

  • Tracker changed from Bug to Feature
  • Assignee set to kosaki (Motohiro KOSAKI)

Updated by mame (Yusuke Endoh) over 12 years ago

  • Status changed from Open to Assigned
  • Target version set to 2.6
#6

Updated by naruse (Yui NARUSE) over 7 years ago

  • Target version deleted (2.6)
ActionsLike0

Also available in: Atom PDF