mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-07 10:17:50 +02:00
Fix
This commit is contained in:
@@ -93,8 +93,8 @@ class BackgroundExecutor(ContextManager):
|
||||
if cancel:
|
||||
task.cancel()
|
||||
# wait for all tasks to finish
|
||||
if tasks := {t for t in tasks if not t.done()}:
|
||||
concurrent.futures.wait(tasks)
|
||||
if pending := {t for t in tasks if not t.done()}:
|
||||
concurrent.futures.wait(pending)
|
||||
# shutdown the executor
|
||||
self.stack.__exit__(exc_type, exc_value, traceback)
|
||||
# re-raise the first exception that occurred in a task
|
||||
|
||||
Reference in New Issue
Block a user