# -*- coding: utf-8 -*-

import multiprocessing

def run(v):
    print('子进程：',v.vlue)
    v.value += 10

if __name__ == "__main__":
    server = multiprocessing.Manager()

    v = server.Value('i',250)

    p = multiprocessing.Process(target=run,args=(v,))

    p.start()
    p.join()

    print('主进程：',v.value)


a291e221735ee1234cda7609a8fd958754ede43b
<mask token>

<mask token>


def run(v):
    print('子进程：', v.vlue)
    v.value += 10


<mask token>

<mask token>


def run(v):
    print('子进程：', v.vlue)
    v.value += 10


if __name__ == '__main__':
    server = multiprocessing.Manager()
    v = server.Value('i', 250)
    p = multiprocessing.Process(target=run, args=(v,))
    p.start()
    p.join()
    print('主进程：', v.value)

import multiprocessing


def run(v):
    print('子进程：', v.vlue)
    v.value += 10


if __name__ == '__main__':
    server = multiprocessing.Manager()
    v = server.Value('i', 250)
    p = multiprocessing.Process(target=run, args=(v,))
    p.start()
    p.join()
    print('主进程：', v.value)

# -*- coding: utf-8 -*-

import multiprocessing

def run(v):
    print('子进程：',v.vlue)
    v.value += 10

if __name__ == "__main__":
    server = multiprocessing.Manager()

    v = server.Value('i',250)

    p = multiprocessing.Process(target=run,args=(v,))

    p.start()
    p.join()

    print('主进程：',v.value)

