Earl Miles wrote:
> Since I was compiling from fresh, I used 1.7.21. After recompiling, I
> realized that nowhere in the Makefile was there an option to turn on
> thread-safe code, so I quickly hacked the Makefile to use -pthread (I
Thanks for the report.
> dunno autoconf at all, and was more interested in expediency). (Sadly,
> -pthread is possibly only valid on Linux systems).
The clean solution is to add an autoconf test for platform-specific
thread handling. I can probably manage this one, even though I can't
properly test it.
> This note might be useful to others who have, in the past, asked about
> the thread-safeness of MySQL++ and not received an answer.
You'll find that on Unixes of all flavors, threads are a second-class
mechanism. It receives little support because we've had fork() almost
since the beginning of Unix, and considerable effort went in early on to
make process spawning fast. Since IPC with child processes is a lot
easier to debug than multiple threads sharing data space, the incentive
on Unixy systems has been to avoid threads.
It's only on systems like Windows, where process spawning is expensive
and IPC historically weak that you have the incentive to use threads.