From: Donal K. F. <don...@ma...> - 2016-09-02 11:50:07
|
On 02/09/2016 12:11, to...@tu... wrote: > Given what you write, it might be some part of tdbc (perhaps the *dbc > library?) isn't thread safe? The core of TDBC is thread-agnostic in the usual Tcl way; it's just bound to an interpreter. If there is a problem, it's in the tdbc::mysql driver package. If we look at the code: http://core.tcl-lang.org/tdbcmysql/artifact/47de19173a3e0d14?ln=1296-1306 ... I might wonder based on the comment whether there is a problem. There might be, but I don't know the mysql client library. Once open, I'd expect connections to be interpreter-bound; that's how all of TDBC is designed to work. (Heh, scanning through the code overall indicates three places with “TODO” that might indicate something relevant, but I don't know for sure.) I assume that if you put the actual connection creation guarded by a mutex, which you can do easily enough from user code via the primitives in the Thread package (i.e., you can check without changing or recompiling the tdbc::mysql code), everything else after that will work as well as the DB permits. Donal. |