On 5/3/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Thu, May 03, 2007 at 03:20:42PM -0500, Sidnei da Silva wrote: > > I can come up with a stack trace. > > IWBN to look at.
Alright, here it is. Now that I look at it, iterSelect() is indeed in the backtrace, but the assignment is in _init, which means it's when the object instance is created. Thinking about it a little bit more, I realize that the problem might actually be one that I fixed *after* stumbling on this, that some objects were being leaked across threads due to a mutable class attribute. One way or another, the assignement here will add _connection to the instance __dict__, where as the ConnectionHub is in the class. If they are the same object that assignement could possibly be skipped, which would end up avoiding the problem that I hit, which was that since _connection was in the instance, it was the same across all threads. In summary, it's not that big of an issue as long as you don't (intentionally or unintentionally) share your SQLObject instances across different threads. File "c:\Python24\lib\site-packages\sqlobject-0.8.2-py2.4.egg\sqlobject\dbconn ection.py", line 776, in next obj = self.select.sourceClass.get(result[0], selectResults=result[1:], conne ction=self.dbconn) File "c:\python24\lib\site-packages\SQLObject-0.8.2-py2.4.egg\sqlobject\main.p y", line 934, in get val._init(id, connection, selectResults) File "c:\python24\lib\site-packages\SQLObject-0.8.2-py2.4.egg\sqlobject\main.p y", line 965, in _init for uit in r: File "c:\python24\lib\site-packages\SQLObject-0.8.2-py2.4.egg\sqlobject\sresul ts.py", line 160, in __iter__ return iter(list(self.lazyIter())) File "c:\python24\lib\site-packages\SQLObject-0.8.2-py2.4.egg\sqlobject\sresul ts.py", line 168, in lazyIter return conn.iterSelect(self) File "c:\Python24\lib\site-packages\sqlobject-0.8.2-py2.4.egg\sqlobject\dbconn ection.py", line 834, in iterSelect self._connection = connection File "c:\Python24\lib\site-packages\turbogears-1.0.1-py2.4.egg\turbogears\data base.py", line 228, in __set__ return self.hub.__set__(obj, type) File "c:\Python24\lib\site-packages\sqlobject-0.8.2-py2.4.egg\sqlobject\dbconn ection.py", line 957, in __set__ -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss