getObjectLockProcesses

getObjectLockProcesses(locktarget: Object;
                       processes:  ProcessDict input;
                       maxEntries: Integer);

The getObjectLockProcesses method of the System class populates the dictionary specified in the processes parameter with all processes that have locks on the object referenced by the locktarget parameter.

The parameters of the getObjectLockProcesses method are listed in the following table.

Parameter Description
locktarget Specifies the object whose locks are to be obtained.
processes Specifies the process dictionary that is to be populated with processes that have locks on the object referenced by the locktarget parameter.
maxEntries Specifies the maximum number of object lock process instances to include in the dictionary.

The following example shows the use of the getObjectLockProcesses method.

vars
    proc        : Process;
    processDict : ProcessDict;
    s           : String;
begin
    app.sharedLock(global);
    create processDict transient;
    system.getObjectLockProcesses(global, processDict, 10);
    foreach proc in processDict do
        write proc;
    endforeach;
epilog
    delete processDict;
end;