Class: Webhookdb::Concurrent::SerialPool

Inherits:
Pool
  • Object
show all
Defined in:
lib/webhookdb/concurrent.rb

Overview

Fake Pool that does work in the calling thread, but behaves like a threaded pool (ie, tasks do not raise).

Instance Method Summary collapse

Instance Method Details

#joinObject

Raises:

  • (@exception)


38
39
40
# File 'lib/webhookdb/concurrent.rb', line 38

def join
  raise @exception if @exception
end

#postObject

Raises:

  • (@exception)


29
30
31
32
33
34
35
36
# File 'lib/webhookdb/concurrent.rb', line 29

def post
  raise @exception if @exception
  begin
    yield
  rescue StandardError => e
    @exception = e
  end
end