I am creating a lot of QWebViews which each create QThreads. The problem is that I am running out of stack space to create more threads. Therefore, I was wondering if there is a way to clean up existing threads. To be clear, I am not the one creating these threads: Qt creates the threads when I show a QWebView.
Most of the threads (about 400/500) have the exact same stack:
0 ntdll!RtlEnableEarlyCriticalSectionEventCreation C:Windowssystem32
tdll.dll 0 0x770b013d
1 KERNEL32!GetVolumePathNamesForVolumeNameA C:Windowssyswow64kernel32.dll 0 0x766d1a2c
2 USER32!MessageBoxA C:Windowssyswow64user32.dll 0 0x74cd086a
3 QEventDispatcherWin32::processEvents qeventdispatcher_win.cpp 831 0x69de3948
4 QEventLoop::processEvents qeventloop.cpp 149 0x69dbf0c5
5 QEventLoop::exec qeventloop.cpp 204 0x69dbf223
6 QThread::exec qthread.cpp 501 0x69cd412b
7 QThread::run qthread.cpp 568 0x69cd4283
8 QThreadPrivate::start qthread_win.cpp 346 0x69cd54d1
9 msvcrt!_itow_s C:Windowssyswow64msvcrt.dll 0 0x75401287
10 msvcrt!_endthreadex C:Windowssyswow64msvcrt.dll 0 0x75401328
11 KERNEL32!BaseCleanupAppcompatCacheSupport C:Windowssyswow64kernel32.dll 0 0x766d339a
12 ntdll!RtlpNtSetValueKey C:Windowssystem32
tdll.dll 0 0x770c9ef2
13 ntdll!RtlpNtSetValueKey C:Windowssystem32
tdll.dll 0 0x770c9ec5
14 ?? 0
Is there any way to clean them up?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…