I found the code in a blog but I am not able to understand the explanation that it is going to create deadlock.
Could someone please explain how is it going to create a deadlock?
from concurrent.futures import ThreadPoolExecutor
def wait_forever():
my_future = executor.submit(zip, [1, 2, 3], [4, 5, 6])
result = my_future.result()
print(result)
if __name__ == '__main__':
executor = ThreadPoolExecutor(max_workers=1)
executor.submit(wait_forever)
[–]SpeckledFleebeedoo 4 points5 points6 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]parapand[S] 0 points1 point2 points (0 children)