Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
boolean haveSlot = false;
while (!haveSlot && stillRunning.get())
{
newSlot.setDestination(new JunkDestination());
if (session.mkdir(shardPath,newSlot,DirMode.EPHEMERAL) != null)
haveSlot = true;
Thread.yield();
}
}
catch(ClusterInfoException e) { failed.set(true); }