Code example for LinkedBlockingQueue

Methods: add

0
            } 
        } 
    } 
 
    public void recreateSurface() { 
        mQueue.add(new RecreateSurfaceMessage());
    } 
 
    public void renderFrame() { 
        // Make sure there's only one render event in the queue at a time. 
        synchronized (this) {
            if (!mRenderQueued) {
                mQueue.add(new RenderFrameMessage());
                mRenderQueued = true;
            } 
        } 
    } 
 
    public void shutdown() { 
        mQueue.add(new ShutdownMessage());
    }