interruptUser
interruptUser(node: Node;
process: Process) serverExecution;
The interruptUser method of the System class causes a conditional interruption of a specified process. The parameters for the interruptUser method are listed in the following table.
| Parameter | Specifies the… |
|---|---|
| node | Node to which the process belongs |
| process | Process that is to be interrupted |
The target process, when interrupted, receives a continuable user interrupted execution-type exception.
The following example shows the use of the interruptUser method.
vars
allNodes: NodeDict;
allProcesses: ProcessDict;
nod: Node;
proc: Process;
begin
allNodes := system.nodes.cloneSelf(true);
foreach nod in allNodes do
allProcesses := nod.processes.cloneSelf(true);
foreach proc in allProcesses do
if process.signOnUserCode = "Wilbur" then
system.interruptUser(nod, process);
return;
endif;
endforeach;
delete allProcesses;
endforeach;
return;
epilog
delete allNodes;
delete allProcesses;
end;
The following example shows the handling of a conditional interrupt in an exception handler.
vars
begin
if exObj.continuable then
if allowInterrupt then
return Ex_Abort_Action;
endif;
return Ex_Continue;
endif;
end;
