import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
class Ideone {
ExecutorService service =
Executors.
newFixedThreadPool(Runtime.
getRuntime().
availableProcessors()); for (int i = 0; i < 10; i++) {
service.
submit(new Worker
(new Object())); }
}
}
public Worker
(Object factory
) { this.factory = factory;
}
@Override
public void run() {
while (true) {
DataSender.send(o);
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwuY29uY3VycmVudC5FeGVjdXRvclNlcnZpY2U7CmltcG9ydCBqYXZhLnV0aWwuY29uY3VycmVudC5FeGVjdXRvcnM7CgpjbGFzcyBJZGVvbmUgewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uIHsKCQlFeGVjdXRvclNlcnZpY2Ugc2VydmljZSA9CiAgICAgICAgICAgICAgICBFeGVjdXRvcnMubmV3Rml4ZWRUaHJlYWRQb29sKFJ1bnRpbWUuZ2V0UnVudGltZSgpLmF2YWlsYWJsZVByb2Nlc3NvcnMoKSk7CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCAxMDsgaSsrKSB7CiAgICAgICAgICAgIHNlcnZpY2Uuc3VibWl0KG5ldyBXb3JrZXIobmV3IE9iamVjdCgpKSk7CiAgICAgICAgfQoJfQp9CgoKY2xhc3MgV29ya2VyIGltcGxlbWVudHMgUnVubmFibGUgewoKICAgIHByaXZhdGUgT2JqZWN0IGZhY3Rvcnk7CgogICAgcHVibGljIFdvcmtlcihPYmplY3QgZmFjdG9yeSkgewogICAgICAgIHRoaXMuZmFjdG9yeSA9IGZhY3Rvcnk7CiAgICB9CgogICAgQE92ZXJyaWRlCiAgICBwdWJsaWMgdm9pZCBydW4oKSB7CiAgICAgICAgd2hpbGUgKHRydWUpIHsKICAgICAgICAgICAgT2JqZWN0IG8gPSBmYWN0b3J5LmdldCgpOwogICAgICAgICAgICBEYXRhU2VuZGVyLnNlbmQobyk7CiAgICAgICAgfQogICAgfQp9Cg==