Guest User

Untitled

a guest
Oct 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/usr/bin/env python2
  2. t1=Thread(target=myfunction, args=('MyStringHere',))
  3. t2=Thread(target=myotherfunction, args=('MyOtherStringHere',1,10))
  4. t1.start();t2.start();
  5. t1.join();t2.join()
  6.  
  7. is equivalent to
  8.  
  9. #!/bin/bash
  10. myfunction MyStringHere & P1=$!
  11. myotherfunction MyStringHere 1 10 & P2=$!
  12. wait $P1; wait $P2
Add Comment
Please, Sign In to add comment