code: def map(self, func, items, chunksize=None):
          
          results = self.map_async(func, items, chunksize)
          while True:
              try:
                  return results.get(1800)
              except TimeoutError:
                  pass
              except KeyboardInterrupt:
                  self.terminate()
                  self.join()
                  raise KeyboardInterrupt
docs: Catch keyboard interuppts to allow the pool to exit cleanly.
  
          Parameters
          ----------
          func: function
              Function to call
          items: list of tuples
              Arguments to pass
          chunksize: int, Optional
              Number of calls for each process to handle at once