{
int count = 100;
List<StringHolder> thunks = CollectionFactory.newList();
ParallelExecutor parallelExecutor = getService(ParallelExecutor.class);
for (int i = 0; i < count; i++)
{
final String value = String.format("Value[%d]", i);
Invokable<StringHolder> inv = new Invokable<StringHolder>()
{
public StringHolder invoke()
{
StringHolder holder = new StringHolderImpl();
holder.setValue(value);
try
{
Thread.sleep(100l);
}
catch (InterruptedException ie)
{
// Swallow
}
return holder;
}
};
thunks.add(parallelExecutor.invoke(StringHolder.class, inv));
}
for (int j = 0; j < 2; j++)
{
for (int i = 0; i < count; i++)