"Alan Kemp" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,

> Can someone suggest a better (ie, valid) strategy for this?

Pass the connection to the thread as a parameter and use it to create a
cursor local to the thread. You may have to create a connection per thread
also - in some database implementations connections are "global" like
cursors are. Cursors are throwaway things anyway.

> Should I
> be using a Queue to make a list of db requests/results to get accross
> the thread boundary (erg, that sounds nasty)?

Maybe - it is safest to limit the amount of threads/cursors/connections that
can be created by people one does not know.

> Should each client
> thread create its own connection/cursor to the database?  Would that
> even work, wont there be locking issues?

Yes, and maybe; one connection/cursor for each thread will always work.

>
> Any suggestions or pointers in the direction of more information would
> be greatly appreciated.

Maybe use queues to pass the requests to a pool of threads; there might be a
limit to how many connection/cursors that can be created at the same time -- 
and some DOS tool will find it.

>
> Thanks for your time,
>
> Alan
>


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to