You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> import tqdm, sys
>>> print(tqdm.__version__, sys.version, sys.platform)
4.66.2 3.12.0 | packaged by conda-forge | (main, Oct 3 2023, 08:43:22) [GCC 12.3.0] linux
Issue
(originally a customer issue in googleapis/python-bigquery-pandas#613)
After using tqdm.close(), a thread by TMonitor remains open. When I set tqdm.tqdm.monitor_interval = 0, TMonitor is disabled and thus does not start a new thread. Reproduction code:
import tqdm
import threading
def print_active_threads():
for item in threading.enumerate():
print(item)
# Uncomment this line results in no TMonitor thread
# tqdm.tqdm.monitor_interval = 0
print("before tqdm")
print_active_threads()
numbers = list(range(3))
pbar = tqdm.tqdm(numbers)
for _ in pbar:
pass
pbar.close()
print("after tqdm")
print_active_threads()
Output:
before tqdm
<_MainThread(MainThread, started 139831307290432)>
100%|████████████████████████████████████| 3/3 [00:00<00:00, 68015.74it/s]
after tqdm
<_MainThread(MainThread, started 139831307290432)>
<TMonitor(Thread-1, started daemon 139831290099392)>
The text was updated successfully, but these errors were encountered:
read the known issues
environment, where applicable:
Version numbers, system and environment
Issue
(originally a customer issue in googleapis/python-bigquery-pandas#613)
After using
tqdm.close()
, a thread by TMonitor remains open. When I settqdm.tqdm.monitor_interval = 0
, TMonitor is disabled and thus does not start a new thread. Reproduction code:Output:
The text was updated successfully, but these errors were encountered: