public static void finishThread ( ) { //--Create Task final long threadId = Thread . currentThread ( ) . getId ( ) ; Runnable finish = new Runnable ( ) { public void run ( ) { releaseThreadControl ( threadId ) ; } } ; //--Run Task if ( isThreaded ) { //(case: multithreaded) attemptThreadControl ( threadId , finish ) ; } else { //(case: no threading) throw new IllegalStateException ( "finishThreads() called outside of threaded environment" ) ; } }
Signal that this thread will not log any more messages in the multithreaded environment