Method: FDB::Database#transact
- Defined in:
- lib/fdbimpl.rb
#transact ⇒ Object
553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/fdbimpl.rb', line 553 def transact tr = create_transaction committed = false begin ret = yield tr # puts ret tr.commit.wait committed = true rescue Error => e # puts "Rescued #{e}" tr.on_error(e).wait end until committed ret end |