uranusjr commented on code in PR #68377:
URL: https://github.com/apache/airflow/pull/68377#discussion_r3509778692
##########
task-sdk/src/airflow/sdk/execution_time/comms.py:
##########
@@ -232,18 +305,24 @@ def send(self, msg: SendMsgType) -> ReceiveMsgType | None:
if TYPE_CHECKING:
assert isinstance(resp, SentFDs)
resp.fds = fds
- # Since we know this is an expliclt SendFDs, and since this
class is generic SendFDs might not
+ # Since we know this is an explicit ResendLoggingFD, and since
this class is generic SentFDs might not
# always be in the return type union
return resp # type: ignore[return-value]
return self._get_response()
+ finally:
+ self._thread_lock.release()
async def asend(self, msg: SendMsgType) -> ReceiveMsgType | None:
"""
Send a request to the parent without blocking.
Uses async lock for coroutine safety and thread lock for socket safety.
"""
+ # Record which OS thread is running the event loop so that send() can
+ # detect when it is called from this same thread (the deadlock
scenario).
Review Comment:
This is too obvious for a comment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]