Crack bcrypt using multiple cores

Using random pastebin examples I wrote a multi-core bcrypt. One bug to fix: after finding a match it doesn't exit early.


from passlib.hash import bcrypt
import os
import sys
import io
import multiprocessing

def chunks(l, n):
    return [l[i:i+n] for i in range(0, len(l), n)]

def do_job(job_id, data_slice):
    for item in data_slice:
        correct = bcrypt.verify(item, hash)
        if (correct):
            print("Found: {0}".format(item))

def dispatch_jobs(data, job_number):
    total = len(data)
    chunk_size = total // job_number
    slice = chunks(data, chunk_size)
    jobs = []
    for i, s in enumerate(slice):
        j = multiprocessing.Process(target=do_job, args=(i, s))
    for j in jobs:
if __name__ == '__main__':
    num_processes = multiprocessing.cpu_count()
    with"orig.txt","r",encoding="ISO-8859-1") as f:
        words =

    hash = input('hash to crack: ')
    dispatch_jobs(words, num_processes)