Sha256: 1bd50ed1c1af14c0d1646349cd910a6cec084b26d1d60ea3e43bb0c5ae94c3d7

Contents?: true

Size: 368 Bytes

Versions: 10

Compression:

Stored size: 368 Bytes

Contents

class Puppeteer::TaskManager
  def initialize
    @tasks = Set.new
  end

  def add(task)
    @tasks << task
  end

  def delete(task)
    @tasks.delete(task)
  end

  def terminate_all(error)
    @tasks.each do |task|
      task.terminate(error)
    end
    @tasks.clear
  end

  def async_rerun_all
    Concurrent::Promises.zip(*@tasks.map(&:async_rerun))
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
puppeteer-ruby-0.45.6 lib/puppeteer/task_manager.rb
puppeteer-ruby-0.45.5 lib/puppeteer/task_manager.rb
puppeteer-ruby-0.45.4 lib/puppeteer/task_manager.rb
puppeteer-ruby-0.45.3 lib/puppeteer/task_manager.rb
puppeteer-ruby-0.45.2 lib/puppeteer/task_manager.rb
puppeteer-ruby-0.45.2.alpha2 lib/puppeteer/task_manager.rb
puppeteer-ruby-0.45.2.alpha1 lib/puppeteer/task_manager.rb
puppeteer-ruby-0.45.1 lib/puppeteer/task_manager.rb
puppeteer-ruby-0.45.0 lib/puppeteer/task_manager.rb
puppeteer-ruby-0.44.3 lib/puppeteer/task_manager.rb