On Apr 15, 8:36 pm, steveluscher <goo...@steveluscher.com> wrote: > > @Fred: Row-level locks are out of the question, since I'm not > interested in blocking updates to a given row, but the creation of > rows that don't yet exist in the Orders table. That said, I found this
Actually that's not true (and mentioned in the blog post I linked). You can lock the row corresponding to a given product, even if you are not going to update that product, purely as a synchronization mechanism (and in that sense it is similar to the named lock stuff). Fred > today – named locks in MySQL. It's a database-specific solution, but > perhaps an easy one? > > http://gist.github.com/95977 > > Named locks in > MySQL:http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#f... > Shopify's locking > implementation:http://github.com/Shopify/locking/blob/835469ed48f4c2de95856fe2f221ea... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---