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()
    ...

aMultithreadAppUsingPerson.run()

If it's not ok, how can I predefine connection for each thread without
the necessity to pass the connection explicitly on every
instantiation? I would really like to workaround the straightforward
code-consuming approach.

------------------------------------------------------------------------------
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to