質問するログイン新規登録

質問編集履歴

3

修正

2021/12/09 06:57

投稿

alfald
alfald

スコア19

title CHANGED
File without changes
body CHANGED
@@ -23,7 +23,6 @@
23
23
 
24
24
  future_list = []
25
25
  dict_a={}
26
- dict_b={}
27
26
  dict_output={}
28
27
  dict_range={'key1':1,'key2':2,'key3':3,'key4':4,'key5':5,'key6':6,'key7':7,'key8':8,'key9':9,'key10':10,'key11':11,'key12':12,'key13':13,'key14':14,
29
28
  'key15':15,'key16':16,'key17':17,'key18':18,'key19':19,'key20':20}
@@ -59,7 +58,6 @@
59
58
 
60
59
  future_list = []
61
60
  dict_a={}
62
- dict_b={}
63
61
  dict_output={}
64
62
  dict_range={'key1':1,'key2':2,'key3':3,'key4':4,'key5':5,'key6':6,'key7':7,'key8':8,'key9':9,'key10':10,'key11':11,'key12':12,'key13':13,'key14':14,
65
63
  'key15':15,'key16':16,'key17':17,'key18':18,'key19':19,'key20':20}

2

修正

2021/12/09 06:57

投稿

alfald
alfald

スコア19

title CHANGED
File without changes
body CHANGED
@@ -67,7 +67,6 @@
67
67
  for key_a,i in dict_range.items():
68
68
  future = executor.submit(sample_func, index=i,key_a=key_a,dict_output=dict_output)
69
69
  future_list.append(future)
70
- dict_output[i]=future.result() #この行を消すと並列実行を行ってくれる
71
70
  _ = futures.as_completed(fs=future_list)
72
71
 
73
72
  print('completed.')

1

修正

2021/12/09 06:54

投稿

alfald
alfald

スコア19

title CHANGED
File without changes
body CHANGED
@@ -31,7 +31,6 @@
31
31
  for key_a,i in dict_range.items():
32
32
  future = executor.submit(sample_func, index=i,key_a=key_a)
33
33
  future_list.append(future)
34
- b_list.append(i)
35
34
  dict_output[i]=future.result() #この行を消すと並列実行を行ってくれる
36
35
  _ = futures.as_completed(fs=future_list)
37
36