x42005e1f commented on issue #50185: URL: https://github.com/apache/airflow/issues/50185#issuecomment-2928146671
The difference can be seen only in some very subtle cases where performing context switching might be too expensive (usually a large number of running threads that give O(n) time, possibly with additional cycles), but this is hardly the Apache Airflow case. And the futures solution to the problem is explained quite simply. When we use any kind of synchronization in the same thread, we have a deadlock because the previous context cannot continue its execution. However, when we use ThreadPoolExecutor, both operations are executed separately, because of which they can be executed without deadlocks - the second synchronous wait can be safely done without completing the asynchronous first one. -- 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]
