Displaying 1 result from an estimated 1 matches for "person_upd".
Did you mean:
  person_id
  
2008 Jan 15
6
SQLite concurrency, SQLite3::BusyException
...em would
disapear, but I thought that rails was supposed to handle this
internally (optimistic locking?)
For example the following code (shortened for clarity purposes) caused
no exception with MySQL but would not run with SQLite. Is this a rails
issue or is it simply normal behavior?
----- lib/person_updator.rb -----
class PersonUpdator
  def self.start
    ActiveRecord::Base.allow_concurrency = true
    p1 = Person.find_by_id(1)
    p2 = Person.find_by_id(2)
    t = Thread.start do
      5.times do
        p1.name = "Michael"
        p1.save
      end
    end
    5.times do
      p2.na...