Class: ThreadLock

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Singleton
Defined in:
lib/casbin-ruby/util/thread_lock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#threadObject

Returns the value of attribute thread.



15
16
17
# File 'lib/casbin-ruby/util/thread_lock.rb', line 15

def thread
  @thread
end

Instance Method Details

#lock?Boolean

Returns:

  • (Boolean)


17
18
19
20
21
# File 'lib/casbin-ruby/util/thread_lock.rb', line 17

def lock?
  return false unless thread

  thread.active?
end