On Mon, 07 Jan 2013 09:17:24 +0100
Christoph Zwerschke <[email protected]> wrote:
> Can you have a look into the threading issues? I'm still not clear 
> whether the notification handler should care about threading (i.e.
> use locks and add a method to run in a thread) or whether we should
> leave it simple as before (remove the locks and threading import). In

I think that this makes the most sense.  We are in the database
business, not the threading business.  In fact, threading isn't even
required here.  It could be a different process.

> any case we should add a warning that the same connection should not
> be used in a different thread.

This is probably a good idea.  In fact, it might make sense to simply
raise an error if someone tries any database operation on a connection
waiting for a notification.  It doesn't have to be thread aware at all.

If someone did a fork() with an open database connection, wouldn't it
have the same problem?  I think at some level we need to let the
programmer deal with this type of stuff.

-- 
D'Arcy J.M. Cain
PyGreSQL Development Group
http://www.PyGreSQL.org IM:[email protected]
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to