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 - CUDA code not processing if block properly -

oracle11g - get root domain from url Oracle sql regex_substr -

xcode - Swift Playground - Files are not readable -