code: public static Thread startOnThread(final AgentRunner runner, final ThreadFactory threadFactory)
      {
          final Thread thread = threadFactory.newThread(runner);
          thread.setName(runner.agent().roleName());
          thread.start();
  
          return thread;
      }
docs: Start the given agent runner on a new thread.
  
  @param runner        the agent runner to start.
  @param threadFactory the factory to use to create the thread.
  @return the new thread that has been started.