Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit54c8d07

Browse files
kien-truongchalmerlowetswast
authored
fix: avoid blocking in download thread when using BQ Storage API (#2034)
This prevents a deadlock between the main thead and download threadswhen the threadpool is shutdown prematurely.Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>Co-authored-by: Tim Sweña (Swast) <swast@google.com>
1 parent3a48948 commit54c8d07

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎google/cloud/bigquery/_pandas_helpers.py‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,10 +796,15 @@ def _download_table_bqstorage_stream(
796796
rowstream=reader.rows(session)
797797

798798
forpageinrowstream.pages:
799-
ifdownload_state.done:
800-
return
801799
item=page_to_item(page)
802-
worker_queue.put(item)
800+
whileTrue:
801+
ifdownload_state.done:
802+
return
803+
try:
804+
worker_queue.put(item,timeout=_PROGRESS_INTERVAL)
805+
break
806+
exceptqueue.Full:# pragma: NO COVER
807+
continue
803808

804809

805810
def_nowait(futures):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp