Thread[] workers = new Thread[syncHosts.count()];
for (int i = 0; i < workers.length; i++) {
final int j = i;
Runnable work = new Runnable() {
public void run() {
MHost aHost = (MHost) syncHosts.objectAtIndex(j);
aHost.sendRequestToWotaskd(aSyncRequest, true, true);
}
};
workers[j] = new Thread(work);
workers[j].start();