我有一個包含以下vb.net停止的代碼,直到一個線程執行finshed
WebUpdateThread = New System.Threading.Thread(AddressOf generatecids)
WebUpdateThread.SetApartmentState(ApartmentState.STA)
WebUpdateThread.Start()
'after starting the thread i have some code that i want to run when the thread finshes its work which takes about 3-4 hours
'if i put for example
MsgBox("something")
消息框儘快顯示功能的線程啓動,我如何讓它等到線程是否被沖洗?
有沒有比檢測線程狀態的infitine while循環更充分的東西?
看到這個類似的線程http://stackoverflow.com/questions/ 5551258/c-net-how-to-alert-program-that-thread-is-finished-event-driven – K3N