remove test.py
This commit is contained in:
parent
119637db46
commit
15f58f829e
20
test.py
20
test.py
|
@ -1,20 +0,0 @@
|
|||
from multiprocessing import Pool, Manager
|
||||
import random
|
||||
import time
|
||||
|
||||
def some_function(some_input):
|
||||
time.sleep(random.random())
|
||||
return some_input
|
||||
|
||||
def test():
|
||||
global testStr
|
||||
testStr = 'Hello'
|
||||
if __name__ == '__main__':
|
||||
test()
|
||||
pool = Pool()
|
||||
manager = Manager()
|
||||
print(pool.map(some_function, [('Hello') for i in range(4)]))
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue