ttanyag
asked on
Delphi events and processing
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?
given:
* 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?
given:
* 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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.