"Ben Sizer" <[EMAIL PROTECTED]> writes: > However, I still wonder if things like identity are handled properly > there - eg. if I'm logged in, make a request in one window to log out, > and in the other window I submit a form which repeated accesses > identity.current in the controller, what will happen? Exception raised > in the form's controller? One request or the other gets blocked until > the other completes? What about SQLObject - does it have any caching, > and if you modify the same object in different threads what happens to > that cache?
Using tabs it is handled properly: both share the same session and when I logout it expires, so when the other tab tries accessing the app it reaches an expired id and is redirected to the login screen. With regards to SO's cache, I believe you'll get inconsistencies and this is one of the problems we faced in the beginning of TG. The solution was to embed all exposed methods inside their own transactions to force SO to read data again when it entered a new transaction. > I don't think my problem is well suited to the additional request > method, as what I have is a task that needs to be started when a > particular page is submitted, but which needs to continue in the > background as it takes too long, modifying the database when it's > finished. I'd rather not have to pass everything off to an external > queue if possible, especially when running a function via the threading > module is so clean and simple. But I'd like some assurance that it's > safe to do so. On the TG side I believe that as long as they're all inside transactions it will be safe that you'll get results right from the database. On your external code side you'd better adopt a similar approach starting and commiting transactions explicitly. SO will honor your request to commit data and when the transaction on the TG app reads from the DB it will get this commited data from it. -- Jorge Godoy <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

