# If we have an error, don't flush - we might be flushing bad stuff. -RobK, 2008-06-26
die $@ if $@;
+ #XXX For some reason, this causes an allocation error in the final scope close
+ # of t/08_deephash.t. -RobK, 2008-06-28
$self->_get_self->_engine->flush;
}
sub begin_work {
my $self = shift->_get_self;
- return $self->_engine->begin_work( $self, @_ );
+ $self->lock_exclusive;
+ my $rv = $self->_engine->begin_work( $self, @_ );
+ $self->unlock;
+ return $rv;
}
sub rollback {
my $self = shift->_get_self;
- return $self->_engine->rollback( $self, @_ );
+ $self->lock_exclusive;
+ my $rv = $self->_engine->rollback( $self, @_ );
+ $self->unlock;
+ return $rv;
}
sub commit {
my $self = shift->_get_self;
- return $self->_engine->commit( $self, @_ );
+ $self->lock_exclusive;
+ my $rv = $self->_engine->commit( $self, @_ );
+ $self->unlock;
+ return $rv;
}
##