2017 © Pedro Peláez
 

library async-process

Asynchronous execution wrappers.

image

sgolemon/async-process

Asynchronous execution wrappers.

  • Thursday, May 26, 2016
  • by sgolemon
  • Repository
  • 0 Watchers
  • 1 Stars
  • 0 Installations
  • Hack
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

===== Awaitable Process, (*1)

Basic Usage:, (*2)

use sgolemon\Async;
use HH\Asio;

async function swapCase(string $str): Awaitable<?string> {
  $proc = new Async\Process('tr', 'a-zA-Z', 'A-Za-z');
  await $proc->run();

  // Will yield control to other awaitables if writing requires blocking
  await $proc->writeStdin($str);
  $proc->closeStdin();

  // Yield control while reading off result of command execution.
  return await $proc->drainStdout();
}

$hELLO = Asio\join(swapCase("Hello"));

The Versions

26/05 2016

dev-master

9999999-dev https://github.com/sgolemon/async-process

Asynchronous execution wrappers.

  Sources   Download

BSD

The Requires

  • hhvm ^3.9

 

The Development Requires

exec async hacklang proc_open popen