13 lines
239 B
Python
13 lines
239 B
Python
import multiprocessing as mp
|
|
#mp.set_start_method('fork')
|
|
|
|
def f(name):
|
|
with open('/Users/gobbo_a/readme.txt', 'w') as f:
|
|
f.write('hello' )
|
|
print('hello', name)
|
|
|
|
|
|
|
|
p = mp.Process(target=f, args=('bob',))
|
|
p.start()
|
|
p.join() |