GlobalResourceRelease Function

Action

Releases a resource that was occupied with the GlobalResourceEnter function. If there are any users waiting for the resource, the next user in the queue resumes the simulation.

Note: The time that a virtual user spends in this synchronization function does not influence the transaction busy time.

Include file

Kernel.bdh

Syntax

GlobalResourceRelease( in sName: string );
Parameter Description
sName Name that identifies a resource.

Example

var
  hConnection: number;

dcltrans
  transaction TLogon
  var
    nRet: number;
  begin
    GlobalResourceEnter("Max 5 logins at a time", 5);
    OraLogon(hConnection, "user", "password", "orclnet2");
    GlobalResourceRelease("Max 5 logins at a time");
    GlobalWaitFor("All are logged in");
  end TLogon;