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) -

xcode - Swift Playground - Files are not readable -

jboss7.x - JBoss AS 7.3 vs 7.4 and differences -