BeginExclusiveControl

Top  Previous  Next

Prototype

 

BeginExclusiveControl

 

Description

 

It is the result from the script in multitasking. If two scripts access contemporary at the same resource the system could crash. To avoid this you have to use the BeginExclusiveControl instruction. This instruction avoids that other thread can take the control until the EndExclusiveControl function is called. The first of this function return false if the other script have just the exclusive control.

 

Parameters

 

None

 

Returned Value

 

None

 

Notes

 

None.

 

Example

 

Ended:=False;

Repeat

begin

 InExclusive:=BeginExclusiveControl;

 if InExclusive then

  begin

   ShowMessage('The Exclusive Control is obtained!');

   EndExclusiveControl;

  End;

End;

Until Ended=True;