SHARE
TWEET

Untitled

a guest Oct 12th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def process_alg1(algorithm1, input_string)
  2.  
  3.     ans_string = algorithm1(input_string)
  4.  
  5.     q.put(ans_string)
  6.  
  7. def process_alg2(algorithm2, input_string)
  8.  
  9.     ans_string = algorithm2(input_string)
  10.  
  11.     q.put(ans_string)
  12.  
  13.  
  14. def apply_transformation(input_string):
  15.  
  16.     q = multiprocess.Queue()
  17.  
  18.     process_alg1(input_string)
  19.  
  20.     process_alg2(input_string)
  21.  
  22.     final_answer = q.get()
  23.  
  24.     stop(slowest_process)
RAW Paste Data
Top