java - Run method for all values in Array at once -


i trying run multiple methods of same method @ same time. right doing 1 @ time , sleeping once loops through of them. need values in array @ same time via method. here current code:

public static void checktimer(ts3api api) {     (string keys : admins) {         //what need: check groups values in string @ same time             checkgroup(api, keys);     }             try {                 //sleep 10 second                 thread.sleep(10000);             } catch (interruptedexception e) {                 // nothing             }     } 

thread.sleep(10000) causes current thread sleep 10 seconds. primary thread. have not split off threads primary one, working wrote it.

take through java documentation http://docs.oracle.com/javase/7/docs/api/java/lang/thread.html

there examples of splitting off threads. should on way solution.


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -