Class: ThreadLock

Inherits:
Object
  • Object
show all
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.



12
13
14
# File 'lib/casbin-ruby/util/thread_lock.rb', line 12

def thread
  @thread
end

Instance Method Details

#lock?Boolean

Returns:

  • (Boolean)


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

def lock?
  return false unless thread

  thread.active?
end