My sAsync project relies on Twisted to maintain a thread pool. It runs
database transactions in some available thread via Twisted's
deferToThread() function. See the transact function in
http://foss.eepatents.com/sAsync/browser/trunk/sasync/database.py for
details.

That arrangement created no problem with SQLite and SA 0.1, even though
SQLite does not allow sharing of connections between threads. Somehow,
SA 0.1 made the transaction run in its thread with a thread-local copy
of the engine and table that was created in the main thread. I never
figured out how, but it just worked.

It doesn't work in SA 0.2, however. I either get the error when trying
to use the main-thread table in the threaded transaction, or have no
table available in the thread because it wasn't created there. Now I'm
trying to figure out how to put humpty dumpty back together again. Any
suggestions?

Best regards, Ed


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to