LockThreads
The LockThreads method acquires a lock
that only a single agent thread may hold at any given time.
Method Synopsis
LockThreads()Parameters
None
Description
The LockThreads method
provides a way for a discovery agent to acquire a lock that only a
single agent thread may hold at any given time. This means that the
code within the locked section is serialized. You should release the
lock by calling the UnLockThreads method.
Example Usage
The following example shows
a call to the LockThreads method followed by a call
to the UnLockThreads method to release the lock.
The example assumes a previous call to the RIV::Agent constructor,
which returns a RIV::Agent object (represented by $agent->).
$agent->LockThreads();
#
# Serialised code goes here
#
$agent->UnLockThreads();
Returns
Upon completion, the LockThreads method
does not return any values.