lib/puppeteer/concurrent_ruby_utils.rb in puppeteer-ruby-0.35.1 vs lib/puppeteer/concurrent_ruby_utils.rb in puppeteer-ruby-0.36.0
- old
+ new
@@ -1,14 +1,14 @@
# utility methods for Concurrent::Promises.
module Puppeteer::ConcurrentRubyUtils
module ConcurrentPromisesFutureExtension
# Extension for describing 2 concurrent tasks smartly.
#
- # page.async_for_navigation.with_waiting_for_complete do
+ # page.async_wait_for_navigation.with_waiting_for_complete do
# page.click('#submit')
# end
def with_waiting_for_complete(&block)
- async_block_call = Concurrent::Promises.future do
+ async_block_call = Concurrent::Promises.delay do
block.call
rescue => err
Logger.new($stderr).warn(err)
raise err
end