On Sunday 28 June 2009 14:04:23 Jeffrey wrote: > I write some logic functions (includes DBSession operations) in one module > will be invoked by many controllers. > > Is it threads safe? > > ------------------------------ > api.py > def upload_avatar(...) > ... > ... > > account.py > class AccountController(Controller): > def upload_avatar(self, **kw): > .... > api.upload_avatar(...) > ... > --------------------------------- > > thanks
Without showing the actual code, there can't be a definite answer. However, DBSessions and SA-objects are thread-safe, as is TG2 itself. So unless you yourself do something unsafe (like relying on global, modified state), the answer is: yes. diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

