Code example for CyclicBarrier

0
			Scrollable scrollable) {
		this.mediaPath = mediaPath;
		this.context = context;
		this.buttonProcessor = processor;
		this.scrollable = scrollable;
		errorBarrier = new CyclicBarrier(PARTIES);
		idTag = this.toString();
	} 
 
	@Override 
	public void onPreExecute() { 
		Log.w(idTag, Logging.getCurrentMethodName());
		registerAsErrorListener(); 
		prepareBeforeRunning(); 
		progress = new ProgressDialog(context);
		progress.setTitle("");
		progress.setMessage("Preparing media...");
		progress.setCanceledOnTouchOutside(false);
		progress.setCancelable(true);
		progress.setOnCancelListener(new DialogInterface.OnCancelListener() {
			public void onCancel(DialogInterface dialog) {