Class: CryptReboot::ElasticMemoryLocker

Inherits:
Object
  • Object
show all
Defined in:
lib/crypt_reboot/elastic_memory_locker.rb

Overview

Try to lock memory if configuration allows it

Constant Summary collapse

LockingError =
Class.new StandardError

Instance Method Summary collapse

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
# File 'lib/crypt_reboot/elastic_memory_locker.rb', line 10

def call
  return if skip_locking?

  locker.call
  nil
rescue locking_error => e
  raise LockingError, 'Failed to lock memory', cause: e
end