Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do i implement a function like CyclicBarrier #1230

Closed
silenceyear opened this issue Dec 16, 2016 · 1 comment
Closed

how do i implement a function like CyclicBarrier #1230

silenceyear opened this issue Dec 16, 2016 · 1 comment

Comments

@silenceyear
Copy link

i have called several requests,i don't care about the callback order,but want to do something after all requests have callbacked just like CyclicBarrier.i created CyclicBarrier and called CyclicBarrier.await() after each callback,but it didn't work,some request(maybe onSuccess callback) even don't execute.

CyclicBarrier barrier = new CyclicBarrier(5, new Runnable() { @Override public void run() { Log.i("CloudSyncTaskService", "CyclicBarrier: done!"); } }); requestBaseArgsSet(wcuSn,barrier);//AsyncHttpClient request requestAdvArgsSet(wcuSn,barrier); requestCollectData(wcuSn,barrier); requestDeviceEvent(wcuSn,barrier); requestDeviceAlert(wcuSn,barrier);

@smarek
Copy link
Member

smarek commented May 22, 2019

Best coding practices should be discussed on stackoverflow.com
Issues in this project are meant to track bugs and feature requests, not general programming questions.

@smarek smarek closed this as completed May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants