Method: AtprotoAuth::Storage::Interface#with_lock

Defined in:
lib/atproto_auth/storage/interface.rb

#with_lock(key, ttl: 30) { ... } ⇒ Object

Execute block with lock

Parameters:

  • key (String)

    Lock key

  • ttl (Integer) (defaults to: 30)

    Lock timeout in seconds

Yields:

  • Block to execute with lock

Returns:

  • (Object)

    Block result

Raises:



81
82
83
# File 'lib/atproto_auth/storage/interface.rb', line 81

def with_lock(key, ttl: 30)
  raise NotImplementedError
end