forked from Archives/langchain
Empty check before pop (#4929)
# Check whether 'other' is empty before popping This PR could fix a potential 'popping empty set' error. Co-authored-by: Junlin Zhou <jlzhou@zjuici.com>
This commit is contained in:
parent
de6e6c764e
commit
9242998db1
@ -58,6 +58,7 @@ class AsyncIteratorCallbackHandler(AsyncCallbackHandler):
|
||||
)
|
||||
|
||||
# Cancel the other task
|
||||
if other:
|
||||
other.pop().cancel()
|
||||
|
||||
# Extract the value of the first completed task
|
||||
|
Loading…
Reference in New Issue
Block a user