Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def process_alg1(algorithm1, input_string)
- ans_string = algorithm1(input_string)
- q.put(ans_string)
- def process_alg2(algorithm2, input_string)
- ans_string = algorithm2(input_string)
- q.put(ans_string)
- def apply_transformation(input_string):
- q = multiprocess.Queue()
- process_alg1(input_string)
- process_alg2(input_string)
- final_answer = q.get()
- stop(slowest_process)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement