Duke Dougal <[email protected]> wrote:

> I am using the Falcon web server and SqlAlchemy core.
> 
> I have read warnings about it not being thread safe.
> 
> I'm not sure what the implications are of this.  Will there be a problem or 
> can I code around it somehow?
> 
> I'm trying to avoid the ORM for now - at least until I have some grasp of 
> what the core is and how it works.


if you’re not doing multithreaded programming, then the issue of
thread-safety is usually not something you need to worry about.

If the integration of Python programs with Falcon has points at which
threads are used, then it needs to handle this issue only to the degree that
some object might be used in multiple threads concurrently. With idiomatic
web applications, the only two objects that live outside of the request are
the session factory and the engine, both of which are thread-safe. The
section
http://docs.sqlalchemy.org/en/rel_0_9/orm/session_basics.html#when-do-i-construct-a-session-when-do-i-commit-it-and-when-do-i-close-it
talks a lot about this, but for more specifics it depends on how one
integrates with Falcon.


> thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to