Class: Ractor

Inherits:
Object
  • Object
show all
Defined in:
lib/ractor/tvar.rb,
lib/ractor/tvar/version.rb

Defined Under Namespace

Classes: RetryTransaction, TVar, TransactionError, TxLogs

Class Method Summary collapse

Class Method Details

.atomicallyObject

TVar APIs



738
739
740
741
742
743
744
745
746
747
748
749
# File 'ext/ractor/tvar/tvar.c', line 738

static VALUE
tx_atomically(VALUE self)
{
    struct tx_logs *tx = tx_begin();
    if (tx != NULL) {
        return rb_ensure(tx_atomically_body, (VALUE)tx,
                         tx_atomically_ensure, (VALUE)tx);
    }
    else {
        return rb_yield(Qnil);
    }
}