|
From: Markus H. <mar...@mh...> - 2008-11-25 12:28:45
|
Quoting Andreas Ericsson <ae...@op...>: > Not necessarily. You can advertise certain interfaces as thread-safe > while making no such statement of other interfaces. For example, it > doesn't make sense to have certain init functions thread-safe, because > they might be designed to run once and once only during the apps' > lifetime. > But this is again one thing that we can't rely upon. We've implemented "instances" (will be available in 1.0) just to avoid that one part of a program shuts down libdbi while another is still using it. This was requested for a program which loads modules at runtime. Some of these modules are linked against libdbi, and it is not known at compile time when and which modules are loaded or unloaded. > > In all likelihood, those platforms will be the ones with decent thread- > support to begin with, so it should be a reasonably safe bet that apps > on such platforms will either not be multi-threaded anyway, or that it's > relatively straightforward to use reentrant functions in libdbi there. > Agreed. But it won't hurt if everyone checks for the drivers and platforms he uses. After all, it is basically just readdir(), gmtime(), and strtok() which are prone to cause problems. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |