'Create the WorkUnit objects to process and pushes them on the
work queue. Each work unit is meant to process a slice of
iterable of size chunksize. If collector is specified, then
the ApplyResult objects associated with the jobs will notify
collector when their result becomes ready.
eturn the list of WorkUnit objects (basically: JobSequences)
pushed onto the work queue'

def _create_sequences(self, func, iterable, chunksize, collector=None):

    assert (not self._closed)
    sequences = []
    results = []
    it_ = iter(iterable)
    exit_loop = False
    while (not exit_loop):
        seq = []
        for i in xrange((chunksize or 1)):
            try:
                arg = it_.next()
            except StopIteration:
                exit_loop = True
                break
            apply_result = ApplyResult(collector)
            job = Job(func, (arg,), {}, apply_result)
            seq.append(job)
            results.append(apply_result)
        sequences.append(JobSequence(seq))
    for seq in sequences:
        self._workq.put(seq)
    return sequences
