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.

writeWhoHasTheLocks(target: Object);
vars
    process     : Process;
    processDict : ProcessDict;
begin
    create processDict transient;
    system.getObjectLockProcesses(target, processDict, 10);
    foreach process in processDict do
        write process.userCode;
    endforeach;
epilog
    delete processDict;
end;