class Sequel::Database::AsyncThreadPool::PreemptableProxy
Object
class for async job/proxy result when the :preempt_async_thread Database
option is used. Uses a mutex for synchronization, and either the JobProcessor
or the calling thread can run code to get the value.
Public Class Methods
new()
click to toggle source
Calls superclass method
Sequel::Database::AsyncThreadPool::BaseProxy::new
# File lib/sequel/extensions/async_thread_pool.rb 321 def initialize 322 super 323 @mutex = ::Mutex.new 324 end
Private Instance Methods
__get_value()
click to toggle source
# File lib/sequel/extensions/async_thread_pool.rb 328 def __get_value 329 @mutex.synchronize do 330 unless defined?(@value) 331 @value = __run_block 332 end 333 end 334 end
Also aliased as: __run