# No timedwait for ConditionVariable?

**URL:** <https://rubytalk.org/t/no-timedwait-for-conditionvariable/13696>\
**Category:** ruby-talk\
**Created:** [20 September 2004 20:29 UTC](https://rubytalk.org/t/no-timedwait-for-conditionvariable/13696 "2004-09-20T20:29:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Sheppard](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@Chris\_Sheppard](https://rubytalk.org/u/Chris_Sheppard)\
**Post date:** [20 September 2004 20:29 UTC](https://rubytalk.org/t/no-timedwait-for-conditionvariable/13696/1 "2004-09-20T20:29:38Z")

</div>

Arrr; am I the only one who wouldn't mind a wait with a timeout in  
ConditionVariable? It works the same as it always does (ie frees the  
mutex, then attempts reacquisition when it returns) and since CV's  
don't have state, you still have to compare, same as always; I just  
want to make a thread that sleeps most of the time, but is responsive  
to a shutdown request; one that is more polite than Thread#kill. I  
suppose I could use the timeout facility, or else just use  
Thread#raise; what would people consider the most Ruby way to be?

Chris
