Class: Sequel::Database::AsyncThreadPool::PreemptableProxy

Inherits:
BaseProxy show all
Defined in:
lib/sequel/extensions/async_thread_pool.rb

Overview

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.

Instance Method Summary collapse

Methods inherited from BaseProxy

#__value, #method_missing, #respond_to_missing?

Methods inherited from BasicObject

const_missing

Constructor Details

#initializePreemptableProxy

Returns a new instance of PreemptableProxy.



328
329
330
331
# File 'lib/sequel/extensions/async_thread_pool.rb', line 328

def initialize
  super
  @mutex = ::Mutex.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Sequel::Database::AsyncThreadPool::BaseProxy