class Sequel::Database::AsyncThreadPool::Proxy
repush the result to handle thread safety).
and the code to get the value will pop the result from that queue (and
synchronization. The JobProcessor will push a result until the queue,
Default object class for async job/proxy result. This uses a queue for
def __get_value
def __get_value @value = @queue.pop # Handle thread-safety by repushing the popped value, so that # concurrent calls will receive the same value @queue.push(@value) end
def __run
def __run @queue.push(__run_block) end
def initialize
def initialize super @queue = ::Queue.new end