Is libdspam Thread-Safe?
A. 3.2 and higher is thread-safe, however this is largely storage driver dependent. At the moment, mysql_drv, pgsql_drv, and hash_drv are thread safe. BDB and SQLite drivers don’t permit concurrent reads/writes and so they never likely be thread-safe. Oracle may be a good candidate for multithread ing in future versions, but is more complex than the other two SQL-based drivers. To use DSPAM in a multithreaded environment, you’ll need to create a separate DSPAM context for each thread and use dspam_attach(). man libdspam for more information. Alternatively, if you’re not concerned about concurrent processing, you should be able to use libdspam with your multithreaded application and with any old storage driver by simply using a mutex to control access to libdspam functions.