Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from multiprocessing import Process
- class Foo(object):
- def __init__(self):
- self._bar = 0
- def bar(self):
- self.bar = 42
- def run(self):
- p = Process(target=self.bar)
- p.start()
- p.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement