Delphi events and processing
Posted on 2001-06-22
What is the outcome when there are 2 different events calling the same procedure? will the procedure be pre-empted or will delphi create another instance of that procedure?
* 2 timers - TimerA and TimerB both enabled at the same time with the same time interval
* 1 common procedure - Procedure Process_Data(code: string); (doing some lengthy processing)
if code=A then process with parameter A
if code=B then process with parameter B
sequence of events:
* enable TimerA and TimerB
* OnTimer of TimerA - call Process_Data('A');
OnTimer of TimerB - call Process_Data('B');
how is the procedure going to proceed? will there be time-slicing? and if so, what are the priorities?