Code example for CyclicBarrier

0
		debug = target.getDebug();
		debugListener = target.getDebugListener();
		 
		sendFlag = (byte)((sendRaw ? 0x01 : 0x00) | (sendOrientation ? 0x02 : 0x00)); 
		 
		sync = new CyclicBarrier(2);
			 
		buffer = ByteBuffer.allocate(49);
		buffer.order(ByteOrder.LITTLE_ENDIAN);
		 
		try {	 
			endPoint = InetAddress.getByName(target.getToIp());
			port = target.getPort();
			socket = new DatagramSocket();
		} 
		catch(Exception e) {			
		} 
					 
		running = true;
		worker = new Thread(new Runnable() { 
            public void run(){