Hi Artyom,

we have made some progress towards this goal, but I'm afraid we're not
there yet. Some of the recent changes (available in CVS only) include
"instances" which allow threads to use the library independently of
each other. This feature was critical for applications that load and
unload modules which in turn are linked against libdbi. However, I
recall that libdbi uses gmtime for time conversions and readdir to
locate available drivers. I don't know whether every supported OS has
the reentrant forms gmtime_r and readdir_r (FreeBSD, Linux, and Cygwin
do). If they do, this would be easy to fix.

I don't know all drivers in sufficient detail to say whether or not
they are thread-safe. We'd have to do a similar code audit to fix
whatever is necessary. I'd be glad if everyone could have a look at
"their" driver and client library and let the list know whether or not
it is thread-safe.

regards,
Markus

Artyom writes:
 > Hello,
 > 
 > I want to know if libdbi is thread safe, meaning:
 > 
 > 1. Safety for accessing the library form different threads 
 >    with different connection objects.
 > 2. I do not need safety on using same connection from different
 >    threads.
 > 
 > Usually this means:
 > 
 > 1. No thread unsafe functions like strtok 
 > 2. No static data that can be accessed from different threads -- full
 >    reenterability
 > 
 > Is this library thread save? Is there specific backends that are not
 > safe? (For example I had seen that sqlite3 backed had removed in 8.3
 > usage of strtoc)
 > 
 > Thank you,
 >   Artyom
 > 
 > 
 >       
 > 
 > -------------------------------------------------------------------------
 > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 > Build the coolest Linux based applications with Moblin SDK & win great prizes
 > Grand prize is a trip for two to an Open Source event anywhere in the world
 > http://moblin-contest.org/redirect.php?banner_id=100&url=/
 > _______________________________________________
 > libdbi-devel mailing list
 > [email protected]
 > https://lists.sourceforge.net/lists/listinfo/libdbi-devel

-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
libdbi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libdbi-devel

Reply via email to