java - Running Runnables in parallel in Android -


basically have 3 runnables download data internet, , want them run in parallel. right have following code:

threadpoolexecutor executor = (threadpoolexecutor) executors.newfixedthreadpool(3); executor.execute(firstrunnable); executor.execute(secondrunnable); executor.execute(thirdrunnable); 

is correct way execute 3 runnables in parallel? thanks!

your code correct. similar question has been answered here.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -