|
-
May 20th, 2019, 07:32 AM
#11
Junior Member
Re: The 1001 questions about vbRichClient5 (2019-05-17)
If Not TH. WaitForEmpty JobQueue (15) = True Then'over 15S automatically clears all
TH. Cancel Execution
Else
End If
If the thread executes for a long time, is the main program hung up and waited for 15S to execute again? If so, it is equivalent to blocking mode, which will affect the mouse click interface response. I used to use the following methods, there is no difference between the two methods, thank you.
Dim tAddTickCount As Long, tTickCount As Long
TAddTickCount = 15
TTickCount = New_c.HPTimer
Do
New_c.SleepEx 10
DoEvents
If TH.WaitForEmpty JobQueue = True Then Exit Do
If New_c.HPTimer - tTickCount > tAddTickCount Then
TH. Cancel Execution
Endif
End If
Loop Until TH.JobQueueCount < 1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|