Em Sunday 09 December 2007 07:47:03 Yasuo Shirai escreveu: > > I don't think this is correct method. > cacheValues should not be modified in each thread?
IIRC, SQLObject should start a new context on every transaction, hence you shouldn't be having problems here because TG wraps expose()d methods inside a transaction. If you are doing that inside a method that isn't expose()d, then you should take care of the begin() and commit() calls to have your transactions correctly handled. > Moreover, do_many_insertions function takes long time, > so it is impractical to lock thread before start transation > for blocking another threads. I have seen just a few rare occasions where locking was needed and it couldn't be surpassed with better database design and normalization. > Do I have to gave up using cache, or to gave up using > MyDataClass and rewrite the function with raw SQL? Maybe giving more context to the list and looking a bit further on the SQL Object documentation where it describes transactions and cache. > Tell me another way if exists. > > -- > Yasuo Shirai You are welcome. -- 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 -~----------~----~----~----~------~----~------~--~---

