Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update python/pyspark/sql/connect/client/reattach.py
Co-authored-by: Martin Grund <[email protected]>
  • Loading branch information
HyukjinKwon and grundprinzip authored Jun 17, 2024
commit b1804f287921fdd129ccd9e50dfa910b1be210e3
3 changes: 3 additions & 0 deletions python/pyspark/sql/connect/client/reattach.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class ExecutePlanResponseReattachableIterator(Generator):
@classmethod # type: ignore[misc]
@property
def _release_thread_pool(cls) -> ThreadPool:
# Perform a first check outside the critical path.
if not cls._release_thread_pool_instance is None:
return cls._release_thread_pool_instance
with cls._lock:
if cls._release_thread_pool_instance is None:
cls._release_thread_pool_instance = ThreadPool(
Expand Down