Code example for PriorityBlockingQueue

0
        HandlerThread thread = new HandlerThread("PriorityIntentService[" + mName + "]");
        thread.start();
 
        mServiceLooper = thread.getLooper();
        mServiceHandler = new ServiceHandler(mServiceLooper);
        mQueue = new PriorityBlockingQueue<QueueItem>();
 
    	Log.v("INFO", "SERVICE_CREATED");
    } 
 
    @Override 
    public void onDestroy() { 
        mServiceLooper.quit();
    } 
 
    protected void onHandleIntent(Intent intent) {
    	Log.v("TEST", intent.toString());
    } 
 
    @Override 
    public void onStart(Intent intent, int startId) {