title: How to explicitly trigger MasterLocustRunner.quit() in locust
body: <p>To simulate specific number of iterations in locust, I am using simple code flow as below : </p>
  
  <pre><code>class NcsoTest(TaskSet):
  
  REQ_HEADER = {
      "Accept": "application/json",
      "Accept-Encoding": "gzip, deflate",
      "Connection": "keep-alive",
      "Content-Length": "860",
      "Content-Type": "application/json",
      "User-Agent": "python-requests/2.21.0",
   }
  
  @seq_task(1)
  def user_workflow(self):
  
      locrunner = MasterLocustRunner()
      for i in range(1, 100, 1):
          self.send_post_request()
          self.send_get_request()
      Singleton.logger().info("Test Number reached. Stopping Locust.")
      #runners.locust_runner.quit()
      locrunner.quit()
  
  def send_post_request(self):
      response = self.client.post("/api/v2/services", data=Singleton.json_body, headers=NcsoTest.REQ_HEADER)
      print response
  
  
  def send_get_request(self):
      response = self.client.get("/api/v2/services", headers=NcsoTest.REQ_HEADER)
      print response
  
  class NcsoLoad(HttpLocust):
  
      max_wait = 300
      min_wait = 300
      sleep_time = 10
  
      task_set = NcsoTest
  </code></pre>
  
  <p>To run this test, I am using command with below parameters :</p>
  
  <pre><code>--host https://10.123.123.123 --min_wait_time 300 --max_wait_time 300 --num_clients 1 --hatch_rate 1 --test_time 5m
  </code></pre>
  
  <p>Although, I am able to execute 100 requests, if these 100 request finish before 5 minutes, locust runner keeps giving error stating MasterLocustRunner needs more parameters which are locust_class &amp; options (which I specified in locust command)</p>
  
  <p>If I un-comment "runners.locust_runner.quit()" and comment "locrunner.quit()",  test keeps on waiting till the graceful terminate call from Master sent after run-time ends.</p>
  
  <p>What I would like to know is, how to manually/end terminate the locust gracefully - Master and Slave.</p>