I have a multi-threaded C++ application, which each thread accesses its own db environment. There's no sharing of anything between the threads. Since the Berkeley DB C++ API is not re-entrant, am I asking for trouble?
the context for each environment is maintained in the various handles. You need to ensure you are not sharing the handles across your threads. As an example: the dbenv handle from one thread should not be shared with another thread.
I don't think you will have any issues. I have tried this with upto 100 threads. Only problem occurs once in a while with null pointers in the middle of prepare statements when the DB is really, really busy. But in normal scenarios, it's a breeze.