Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python2
- t1=Thread(target=myfunction, args=('MyStringHere',))
- t2=Thread(target=myotherfunction, args=('MyOtherStringHere',1,10))
- t1.start();t2.start();
- t1.join();t2.join()
- is equivalent to
- #!/bin/bash
- myfunction MyStringHere & P1=$!
- myotherfunction MyStringHere 1 10 & P2=$!
- wait $P1; wait $P2
Add Comment
Please, Sign In to add comment