code: public void submitSynchronous(Runnable task) {
          lock.writeLock().lock();
          try {
              awaitInner();
              task.run();
          } catch (InterruptedException e) {
              Log.error(e, "Task queue isolated submission interrupted");
              throw new RuntimeException(e);
          } catch (Exception e) {
              Log.error(e, "Task queue isolated submission failed");
              throw new RuntimeException(e);
          } finally {
              lock.writeLock().unlock();
          }
      }
docs: Submits a non value-returning task for synchronous execution. It waits for all synchronous tasks to be
  completed.
  
  @param task A task to be executed synchronously.