CustomLock object implements
critical section lock that can be used in the applications. It is
mostly needed in multithreaded applications for synchronization. In
ASP it can be put in the Application or Session and can be used to
serialize access to some shared resource - such as text file and so
on.
Using text files in ASP applications can be a good alternative
to the DB usage in some cases. But in that case developer should
take care about serialization of the access to the file - this
component can help in doing so.
There are many specific scripting hosts that support multiply
threads. Synchronization in such a hosts is extremely important
and if the host has not enough instruments for the purpose then
CustomLock can help to the scripters to synchronize access to the
shared resources.
In C++ this class is not very useful unless the C++ part of the
code does not need synchronization over an object shared with the
script part of the application. In that case C++ developer needs
to implement some kind of synchronization and CustomLock can be
used for it.