Code example for SynchronousQueue

Methods: put

0
    } 
 
    private void error(String msg) {
        Log.e(LOGTAG, msg);
        try { 
            mDataQueue.put("ERROR\n" + msg + "\n");
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        } 
    } 
 
    private void eglError(EGL10 egl, String msg) {
        error(msg + " (EGL error " + Integer.toHexString(egl.eglGetError()) + ")");
    } 
 
    public String getData() {
        String data = mDataQueue.poll();
        if (data != null)
            return data;