Multi-threaded client ?
Posted in 1999
Topics: General Discussion
Is it possible to make a informix client that is multi-threaded process ? In other words, one unix process can act as multiple clients for Informix server with many threads ? Thanks in advance, from Eunsook.
Eunsook Jin wrote: > > Is it possible to make a informix client that is multi-threaded process > ? > In other words, one unix process can act as multiple clients for > Informix server with > many threads ? Yes absolutely. ESQL/C 7.24+ and SDK 2.02+ (which contains ESQL/C 9.??) are thread safe. ESQL/C supports multiple connections per process and threads can access these connections. The only restriction is that only one thread at a time can access any particular connection. You can either dedicate a thread to handle each connection or have a connection pool and a thread that needs a connection uses mutexes and conditions to find a free one, locks its condition, activates the connection, uses it as needed, deactivates it (leaving the connection open), and frees the connections condition. Art S. Kagel
Does this imply that transactions are on a per-connection basis (as opposed to having a transaction per thread)? Jun Nolasco Art S. Kagel wrote: > > Eunsook Jin wrote: > > > > Is it possible to make a informix client that is multi-threaded process > > ? > > In other words, one unix process can act as multiple clients for > > Informix server with > > many threads ? > > Yes absolutely. ESQL/C 7.24+ and SDK 2.02+ (which contains ESQL/C 9.??) > are thread safe. ESQL/C supports multiple connections per process and > threads can access these connections. The only restriction is that > only one thread at a time can access any particular connection. You > can either dedicate a thread to handle each connection or have a > connection pool and a thread that needs a connection uses mutexes and > conditions to find a free one, locks its condition, activates the > connection, uses it as needed, deactivates it (leaving the connection > open), and frees the connections condition. > > Art S. Kagel