|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import concurrent.futures
|
|
|
|
|
import time
|
|
|
|
|
import random
|
|
|
|
|
import swarms.utils.futures
|
|
|
|
|
import swarms.utils.execute_futures
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def f(x):
|
|
|
|
@ -11,4 +11,4 @@ def f(x):
|
|
|
|
|
|
|
|
|
|
with concurrent.futures.ThreadPoolExecutor() as executor:
|
|
|
|
|
fs_dict = {str(i): executor.submit(f, i) for i in range(10)}
|
|
|
|
|
print(swarms.utils.futures.execute_futures_dict(fs_dict))
|
|
|
|
|
print(swarms.utils.execute_futures.execute_futures_dict(fs_dict))
|
|
|
|
|