import dataclasses
import multiprocessing


@dataclasses.dataclass
class Config:
    arg: int = 1


global_config = Config(arg=2)


def process1():
    print('Process1 arg=', global_config.arg)


def main():
    global_config.arg = 3
    multiprocessing.set_start_method("spawn")
    p1 = multiprocessing.Process(target=process1)
    p1.start()
    p1.join()
    print('main arg=', global_config.arg)


if __name__ == '__main__':
    main()
