```java
for (;;) {
    Runnable task = toDeployOnQuorum.poll();
    if (task == null) {
        break;
    }
    try {
       task.run();
    } catch (Throwable t) {
        ...
    }
}
```