Hi Loren,

Thanks for quick response. The previous application
is written by me in ANSI C using mysql API. I'd love to write it in Java if it was first time:)
Do you have any suggestion related to MySQL C API?


Ganbold


At 02:28 AM 7/8/2003 -0700, you wrote:
I'm not sure if there are formal resources on this topic, but here are some basic
guidelines I have followed in the past:


1) You can imagine that each running thread will have its own MySQL connection.
2) The connection can get created and held for the lifetime of a thread, or, if you
plan to have threads created/destroyed repeatedly, then the connection can come
from a connection pool.
3) Make sure that MySQL is configured to handle the number of simultaneous open
connections you are planning to create.


If you are just trying to write an app that has multiple threads accessing MySQL
(versus trying to use/learn C++), you may want to consider using Java and the
Connector/J JDBC driver. The Jakarta DBCP project gets you no-hassle connection
pooling. And if Posix threads are important, the latest 1.4.2 JVM can use the
Native Posix Thread Library (NPTL) found on RH9.0.


-Loren

--- Ganbold <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm new to multi-threaded programming and reading the book "Programming
> with POSIX Threads" and
> trying to understand concepts and coding.
>
> What I'm trying to do is to rewrite mysql client application (which
> calculates ISP dial-up customers' billing)
> into multi-threaded version.
>
> I'm looking for some resources on multi-threaded mysql application
> programming and
> it will be great if somebody knows some tutorials, samples and howto
> documentations on the web.
>
> I searched the web and didn't find anything related to mysql multi-threaded
> programming.
>
> I tried to look at mysql.cc code but didn't find any mysql_thread_init()
> calls in the source.
>
> thanks in advance,
>
> Ganbold
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
>



__________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to