4 messages in com.mysql.lists.plusplusRe: Strange interaction problem with ...
FromSent OnAttachments
Earl Miles26 Oct 2004 16:44.cpp
Chris Frey28 Oct 2004 20:29 
Earl Miles17 Nov 2004 09:20 
Warren Young17 Nov 2004 16:47 
Subject:Re: Strange interaction problem with mysql++ and net-snmp
From:Warren Young (mysq@etr-usa.com)
Date:11/17/2004 04:47:11 PM
List:com.mysql.lists.plusplus

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.