public void stop ( ) { thread . requestStop = true ; long start = System . currentTimeMillis ( ) + timeout ; while ( start > System . currentTimeMillis ( ) && thread . running ) Thread . yield ( ) ; device . stopDepth ( ) ; device . stopVideo ( ) ; device . close ( ) ; }
Stops all the threads from running and closes the video channels and video device