Is there any way to check if a given thread is sleeping?
I am not sure if there is a better way but you could change a variable when a thread goes to sleep and check that variable if the thread is sleeping or not.