Code example for Thread

Methods: start

0
 
    // map for playback data 
    private HashMap<Integer, ByteBuffer> mDataMap = new HashMap<Integer, ByteBuffer>();
 
    public boolean start() { 
        Log.d(TAG, "start");
        mExitRequested = false;
        mThread.start();
        //Log.d(TAG, "started"); 
        return true; 
    } 
 
    public void stop() throws InterruptedException { 
        Log.d(TAG, "stop");
        mExitRequested = true;
        try { 
            mClientLock.lock();
            if (mClient != null) {
                // wake up from socket read 
                mClient.shutdownInput();
            }