Code example for LinkedBlockingQueue

0
        } 
    } 
 
    public EventLoader(Context context) {
        mContext = context;
        mLoaderQueue = new LinkedBlockingQueue<LoadRequest>();
        mResolver = context.getContentResolver();
    } 
 
    /** 
     * Call this from the activity's onResume() 
     */ 
    public void startBackgroundThread() { 
        mLoaderThread = new LoaderThread(mLoaderQueue, this);
        mLoaderThread.start();
    } 
 
    /** 
     * Call this from the activity's onPause() 
     */ 
    public void stopBackgroundThread() {