Project

General

Profile

Bug #16608

ConditionVariable#wait should return false when timeout exceeded

Added by shugo (Shugo Maeda) 6 months ago. Updated 3 months ago.

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

Description

The following program prints false on Ruby 1.8, but true on Ruby 1.9 or later.

require "monitor"
m = Monitor.new
c = m.new_cond
m.synchronize { p c.wait(0.1) }

However, it's not critical because most programs check the condition after wait.

Also available in: Atom PDF