Code example for ExecutorService

Methods: shutdownNow

0
        if (mThread != null) {
 
            mThread.interrupt();
            if (mThreadPool != null) {
                try { 
                    mThreadPool.shutdownNow();
                } catch (SecurityException e) {
                    Slog.w(LOG_TAG, "Could not stop all view server threads");
                } 
            } 
            mThreadPool = null;
            mThread = null;
            try { 
                mServer.close();
                mServer = null;
                return true; 
            } catch (IOException e) {
                Slog.w(LOG_TAG, "Could not close the view server");
            } 
        } 
        return false;