我有一个包含以下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