code: private void commitAndRun(Substream winningSubstream) {
      Runnable postCommitTask = commit(winningSubstream);
  
      if (postCommitTask != null) {
        postCommitTask.run();
      }
    }
docs: Calls commit() and if successful runs the post commit task.