public static Terminator of(Terminable... terminables) { return new Terminator().add(terminables); }
@Override public Joinable terminate() { synchronized (terminateLock) { // as flows are created lazily, it's possible that some flows are created after termination of // this container; this flag ensures that new flows are stillborn terminated = true; Terminator.of(createdFlows).terminate(); } return this; }
public static Terminator blank() { return new Terminator(); } }
public static Terminator of(Collection<? extends Terminable> terminables) { return new Terminator().add(terminables); }