Deadlock due to race condition in download thread when using Bigquery Storage API
kien-truong opened this issue · 1 comments
kien-truong commented
There is a race condition in the download thread and the main thread when using Bigquery Storage API to fetch data.
python-bigquery/google/cloud/bigquery/_pandas_helpers.py
Lines 797 to 801 in a76af35
python-bigquery/google/cloud/bigquery/_pandas_helpers.py
Lines 934 to 942 in a76af35
When the download thread is blocked on worker_queue.put(item)
, if the main thread exit, causing the pool to shut down, the download thread will be stuck. This behavior prevents the program from exiting.
kien-truong commented
@chalmerlowe can you take a look at this issue and my corresponding PR #2034? thanks