why are you using twisted *with* threads ? didnt we all agree that
was sort of unnecessary ?
(this goes to my point that twisted is a pain in the butt...)
anyway, SA 0.2 uses the same idea for sqlite threading as 0.1....it
maintains each connection thread locally since you cant share a
sqlite connection between threads. im also not sure what youre
talking about with a "thread local copy of the engine", if thats
something youre doing on your end, you might want to not do that.
use Connection objects instead theyre much more portable.
On May 27, 2006, at 6:57 PM, Ed Suominen wrote:
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
-------------------------------------------------------
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