Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # this is from The Python
- # Standard Library by example
- # ISBN13: 9780321767349
- import multiprocessing
- class Worker(multiprocessing.Process):
- def run(self):
- print 'In %s' % self.name
- return
- if __name__ == '__main__':
- jobs = []
- for i in range(5):
- p = Worker()
- jobs.append(p)
- p.start()
- for j in jobs:
- j.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement