On Apr 9, 2004, at 12:14 AM, Shayne ONeill wrote:
Then webware starts threading it. Now at this stage I'm *convinced* the
cursor is NOT threadsafe.

Absolutely it is not threadsafe. MySQL connections are not threadsafe either, I believe. If that's really the problem, then the error is simply that the only way the application has been tested for concurrency is by hitting the submit button multiple times; but in any real situation the application will die very quickly.


Theres good reason too. A db cursor essentially keeps stateful info on
where the querys and stuff are 'at'.
So if thread #1 is in a diferent stage of life cycle and using the cursor
then if thread #2 molests the cursor, it'll upset thread #1.


The answer is to either aquire a threadlock around cursor usage , or if
that does not work, then use multiple cursors (which might punish mysql.


Now If I understand correctly somewhere out there there is a db cursor
pooling library. That might hold the key.

There's a DBPool class in Webware, somewhere (MiscUtils?). It handles this.


--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to