Matthew Williams wrote:
"It's much trickier if you want to use the ORM, unless you are very
careful to fully eager load every thing in any possible database
operation if you have need of the information subsequently in your
twisted code. Otherwise you may block unexpectedly simply when
accessing your objects, and end up with database operations from the
main twisted thread."
So perhaps I should have said "SQL Alchemy's ORM and threads don't get
along too well"... that's not to say it's impossible, you just have to
be exceedingly careful how you use it.
I think you have the wrong end of the stick.
SQLAlchemy and threads play fine, SQLAlchemy and Twisted's asynchronous
model, which refuses to use threads on principle, do not, for the
reasons you describe.
It took me quite some time to piece together everything I could find
related to sAsync (which seems to be a dead but functional project),
so I threw up a quick Trac page for it at http://sasync.org.
Cool. What is it you're doing that needs to mix Twisted and SQLAlchemy?
The project (an internal project) doesn't really *need* to mix them... I
could just use mysqldb.
Heh, wrong end of the stick again; my question was why you needed to use
Twisted ;-)
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.