# Missing thread state?

**URL:** <https://www.ruby-forum.com/t/missing-thread-state/51988>\
**Category:** Ruby\
**Created:** [January 9, 2006, 10:58pm UTC](https://www.ruby-forum.com/t/missing-thread-state/51988 "2006-01-09T22:58:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![markcasio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Post date:** [January 9, 2006, 10:58pm UTC](https://www.ruby-forum.com/t/missing-thread-state/51988/1 "2006-01-09T22:58:25Z")

</div>

I’ve been looking at the ri documentation for Thread.status. It’s  
seems like there’s a thread status that isn’t accounted for. What is  
the status of a thread that is ready to run, but is waiting for the  
scheduler to select it? Neither “run” or “sleep” seems appropriate.

---

<div class="post-metadata">

**Author:** ![markcasio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Post date:** [January 10, 2006, 2:56pm UTC](https://www.ruby-forum.com/t/missing-thread-state/51988/2 "2006-01-10T14:56:53Z")

</div>

On 1/9/06, Mark V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve been looking at the ri documentation for Thread.status. It’s  
> seems like there’s a thread status that isn’t accounted for. What is  
> the status of a thread that is ready to run, but is waiting for the  
> scheduler to select it? Neither “run” or “sleep” seems appropriate.

It turns out the thread status of “run” means that the thread is  
_eligible_ to be run, not that it is currently running. There is no  
state that indicates that a given thread is currently running. I guess  
that’s because when a piece of code wants to check this, its thread is  
the one that is running. Of course this won’t work if and when we get  
native threads where it’s actually possible for two threads to be  
running concurrently on different processors.
