Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Managing Event Types | Event Type Definition Cache | Locking the Type Definition Cache
Locking the Type Definition Cache
Multi-threaded applications may run into problems if one thread is accessing event type definition information and another thread calls the awFlushTypeDefCache function. In these situations, threads that need to access the type definition cache should lock the cache before using the following functions:
* awGetEventTypeName
* awGetEventTypeNames
* awGetEventTypeDef
* awGetEventTypeDefs
* awGetTypeDefFieldNames
* awGetTypeDefFieldType
* awGetTypeDefBrokerHost
* awGetTypeDefBrokerName
* awGetTypeDefBrokerPort
Use the awLockTypeDefCache function to lock the local type definition cache and prevent it from being altered or flushed.
Once a thread has finished accessing event type definition information, it should unlock the cache using the awUnlockTypeDefCache function.