Re: [SQLObject] Using __connection__ in a multi-thread application

2009-06-24 Thread Oleg Broytmann
On Wed, Jun 24, 2009 at 01:50:29PM +0400, Alex wrote: > how can I predefine connection for each thread without > the necessity to pass the connection explicitly on every > instantiation? from sqlobject import sqlhub sqlhub.threadConnection = connectionForURI(connection_string) Oleg. -- Oleg

[SQLObject] Using __connection__ in a multi-thread application

2009-06-24 Thread Alex
Is it thread safe to define __connections__ on the startup of a server for the later use in multiple threads? ... __connection__ = connectionForURI(connection_string) class Person(SQLObject): ... class MultithreadAppUsingPerson: ... persons = Person.select() ... aMultithreadAppU