Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from multiprocessing import Process
- class C(object):
- VAR = 'DEFAULT'
- def print_c():
- print(f'C.VAR = {C.VAR}')
- def main():
- print_c()
- C.VAR = 'CHANGED'
- print_c()
- p = Process(target=print_c, daemon=True)
- p.start()
- p.join()
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement