Are C-ISAM functions re-entrant?
Posted in 2000
Topics: General Discussion
Hi all, Does anyone know if C-ISAM functions are thread-safe or if there are any issues regarding their use in a multithreaded environment (specifically UnixWare 2.x)? Thanks in anticipation Mohammed Alfakhrany
Mohammed Alfakhrany wrote: > Does anyone know if C-ISAM functions are thread-safe or if there are any > issues regarding their use in a multithreaded environment (specifically > UnixWare 2.x)? C-ISAM is not thread-safe nor re-entrant. The only safe way to access C-ISAM in a multi-threaded environment, therefore, is to provide some mutex (or equivalent) that allows a thread to set the input global variables to a C-ISAM call, make the call, and retrieve the results from the output global variables (some of which are the same as the input global variables). It is not sufficient merely to provide a wrapper for the C-ISAM functions; you have to deal with isrecnum, isreclen, iserrno (and possibly the isstatN globals if you're using the COBOL feedback mechanism). -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!" PS: Please excuse an overly long line if that's what you see. I'm experimenting.