update from Atlas

This commit is contained in:
Luciano Ramalho
2015-04-05 12:07:28 -03:00
parent cf96836b60
commit bdccc3269a
25 changed files with 394 additions and 47 deletions

View File

@@ -0,0 +1,19 @@
import os
from parallelize import parallelize
from time import sleep, time
print('one process:')
t0 = time()
for i in range(12):
print('%2d pid = %d' % (i, os.getpid()))
sleep(.2)
print('elapsed time: %0.2f' % (time() - t0))
print()
print('several processes:')
t0 = time()
for i in parallelize(range(12)):
print('%2d pid = %d' % (i, os.getpid()))
sleep(.2)
print('elapsed time: %0.2f' % (time() - t0))