ubell (AT) sleepycat (DOT) com wrote:
Quote:
The thread_id function defaults to the right thing on systems that
support pthread mutexes. So in most cases you need not write your own
version. The thread_id function is only used for notating what thread
created a transaction or holds a mutex and is not required for proper
functioning of the BDB library unless you use the DB_ENV->failchk
interface. The is_alive function is used by the failchk interface to
determine if a thread is still alive. Please see:
http://www.sleepycat.com/docs/api_cxx/env_failchk.html
Michael Ubell
Sleepycat Software. |
I've looked through the various documentation on set_isalive, and
env_failchk. What I can't seem to figure out is how to write my
is_alive function. I'm using the CDS product with a number of
processes. Are each of them supposed to implement the is_alive function
or is only the process that calls failchk supposed to? Since my
processes are unrelated, is my is_alive suppose to somehow manage my
various processes pids? My processes are kicked off via a web server as
cgi programs. They don't live long.
I looked at DB_REGISTER but that doesn't seem to work for CDS.