Code example for BlockingQueue

Methods: clear

0
		i.putExtras(b);
		sendBroadcast(i, null);
		int inuse = TINYG_BUFFER_SIZE - serialBufferAvail.availablePermits();
		if (inuse > 0)
			serialBufferAvail.release(inuse);
		queue.clear();
		writeLock.release();
		if (dequeueWorker != null)
			dequeueWorker.interrupt();
		dequeueWorker = null;
		ioLog.close();
		Log.d(TAG, "disconnect done");
	} 
 
	public class TinyGBinder extends Binder {
		public TinyGService getService() { 
			return TinyGService.this;
		} 
	} 
 
	@SuppressLint("DefaultLocale")