Using Threads

Threaded Applications

Multithreading using kvadblib

Core principle: A database handle and its message and signal handles are not thread safe.

If you need to access and walk through the same database, message or signal enums from different threads you need to either:

  • Recommended: Open one database handle per thread and add the database file to each handle.
  • Ensure mutual exclusion while performing the entire walk through the database, message, or enums.

Do not attempt to use the same database handle to walk through the database, message or signal enums from different threads simultaneously. It will not work.

Message handles and signal handles are not temporary references. They are valid as long as the loaded database is not modified. For example, looking up the same message id will return the same message handle for each call on the same database handle.