|
Previous Top Next |
Prototype: | (ITThreadLimitGlobalClass pGlobalClass),BYTE |
pGlobalClass | Reference to the global class instantiated in the project or application. |
Returns | If the procedure can be run without hitting the MaxRuns limit, the method returns True. If the procedure hits the MaxRuns limit, the method returns False. |
This method is used to check at the very start of the procedure, right after INIT and SetProcedureLimit, if the procedure is going to hit its MaxRuns limit or not. If it hits the limit the method returns False but if it does hit the limit it returns True. The template generate the call to this method into the WindowManager.Run method at priority 1 so it is the very first code that is executed when the procedure is run.
Example:
ITThreadLocal Class(ITThreadLimitClass)
TakeLimit Procedure,VIRTUAL
End
ThisWindow.Run PROCEDURE
Code
ITThreadLocal.Init('Browsepeople')
ITThreadLocal.SetProcedureLimit(1)
If Not ITThreadLocal.CheckProcedure(ITThreadLimit)
Return LEVEL:Fatal
End
ReturnValue = PARENT.Run()
RETURN ReturnValue
ThisWindow.Init PROCEDURE
Code
If Not ITThreadLocal.AddProcedure(QuickWindow)
Return LEVEL:Fatal
End
See also:
CheckProcedure (Global class)