incubator-empire-db-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele <>
Subject re: Multi-threading and DBDatabase
Date Sat, 28 Aug 2010 08:41:33 GMT
Hi exxos,


errors are kept on a per thread basis in a so called Thread-local storage (TLS), hence every
thread has its own error status.






from: exxos [] 
re: Multi-threading and DBDatabase



This question has already been initiated, but here, it is to talk about another aspect.

A short reminder:
- Only one instance of DBDatabase is required for the whole application. It can be save in
a static variable, for example, at the start-up of the application.

Now my question is:

In case of multi threading (sharing the same DBDatabse object between thread), how can we
trust that the return of getErrorMessage() will concern the current execution?
Do we have to put in place a semaphore (a lock mechanism) on DBDatabase?


View raw message