This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'async' | |
require 'benchmark' | |
require 'open-uri' | |
require 'httparty' | |
n = 3 | |
Benchmark.bm(20) do |b| | |
b.report "Sequential" do | |
n.times do |i| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Flammarion::Writeable | |
# Run the given program using Open3.popen3 and redirects output to the subpane("out") (STDOUT and STDERR). | |
# | |
# This method does not block, but returns after the program has been started. | |
# | |
# Caution: By default most program run via Open3.popen3 assume they are started in non PTY mode and will buffer their output. | |
# To tell the program to be interactive use something like 'script -qefc \"<program>\" /dev/null' as command. | |
# See https://stackoverflow.com/questions/1401002/trick-an-application-into-thinking-its-stdout-is-a-terminal-not-a-pipe | |
# | |
# +*cmd+:: cmd string to pass to Open3.popen3 |