Skip to content

Commit d9d2c83

Browse files
authored
Update concurrent.futures.rst
1 parent 1b886c5 commit d9d2c83

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/concurrent.futures.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ And::
151151
print(f.result())
152152

153153
executor = ThreadPoolExecutor(max_workers=1)
154-
executor.submit(wait_on_future)
155-
# Note: calling future.result() here would cause a deadlock because the single
156-
# worker thread is already executing wait_on_future(), which itself is waiting
157-
# for a result from the same executor.
154+
future = executor.submit(wait_on_future)
155+
# Note: calling future.result() would also cause a deadlock because
156+
# the single worker thread is already waiting for wait_on_future().
157+
158158

159159
.. class:: ThreadPoolExecutor(max_workers=None, thread_name_prefix='', initializer=None, initargs=())
160160

0 commit comments

Comments
 (0)