code: @Nonnull
    public static EInterrupt waitUntilAllTasksAreFinished (@Nonnull final ExecutorService aES,
                                                           @Nonnegative final long nTimeout,
                                                           @Nonnull final TimeUnit eUnit)
    {
      ValueEnforcer.notNull (aES, "ExecutorService");
  
      try
      {
        while (!aES.awaitTermination (nTimeout, eUnit))
        {
          // wait until completion
        }
      }
      catch (final InterruptedException ex)
      {
        if (LOGGER.isErrorEnabled ())
          LOGGER.error ("Error waiting for Executor service " + aES + " to end", ex);
        Thread.currentThread ().interrupt ();
        return EInterrupt.INTERRUPTED;
      }
      return EInterrupt.NOT_INTERRUPTED;
    }
docs: Wait indefinitely on the {@link ExecutorService} until it terminates.
  
  @param aES
  The {@link ExecutorService} to operate on. May not be
  <code>null</code>.
  @param nTimeout
  the maximum time to wait. Must be &gt; 0.
  @param eUnit
  the time unit of the timeout argument. Must not be <code>null</code>
  .
  @return {@link EInterrupt#INTERRUPTED} if the executor service was
  interrupted while awaiting termination. Never <code>null</code>.