'Uses the threadpool to return a list of the results of applying the
function to the items of the argument sequence(s). If more than one
sequence is given, the function is called with an argument list
consisting of the corresponding item of each sequence. If more than one
sequence is given with different lengths the argument list will be
truncated to the length of the smallest sequence.
If the kwarg jobid_fn is specified then each threadpool job will be
assigned a jobid based on the return value of jobid_fn(item) for each
item in the map.'

def map(self, fn, *seq, **kwargs):

    if (self._results_queue.qsize() > 0):
        self.get_results()
    args = zip(*seq)
    jobid_fn = kwargs.get('jobid_fn')
    for seq in args:
        jobid = None
        if jobid_fn:
            jobid = jobid_fn(*seq)
        self.simple_job(fn, seq, jobid=jobid)
    return self.wait(numtasks=len(args))
