IlsLockableEntity
 
IlsLockableEntity
Category 
Modeling class - API FOR ADVANCED USERS
Inheritance Path 
IlsEntity
IlsLockableEntity
Description 
This class is used with multithreaded applications. It lets you lock an entity once within a thread. This type of lock is riskier than the type of lock defined using IlsSafelyLockableEntity but offers better performance.
Libraries 
<server> and <mvcomp>
Header File 
#include <ilserver/model.h>
Synopsis 
class IlsLockableEntity:
public IlsEntity
{
public:
IlsBoolean lock();
IlsBoolean trylock();
IlsBoolean unlock();
};
Member Functions 
IlsBoolean lock();
This member function locks the entity. If the entity is locked by another thread, it will wait until the lock can be taken. The member function returns IlsFalse if the operation fails.
An entity cannot be locked several times by the same thread.
IlsBoolean trylock();
This member function tries to lock the entity. It returns IlsFalse if the lock cannot be taken. Unlike the member function lock above, it does not wait until the operation becomes possible.
IlsBoolean unlock();
This member function unlocks the entity. An entity can be unlocked:
*Only by the thread that locked it
*Only if it has been locked first.
This function returns IlsFalse if an error occurs.
See Also 
IlsSafelyLockableEntity, IlsThread

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.