child-process icon indicating copy to clipboard operation
child-process copied to clipboard

Consider adding specific libuv adapter

Open clue opened this issue 6 years ago • 2 comments

We may want to add a specific adapter taking advantage of libuv's process handling logic:

  • http://docs.libuv.org/en/v1.x/process.html
  • https://github.com/bwoebi/php-uv#resource-uv_spawnresource-loop-string-command-array-args-array-stdio-string-cwd-array-env--array-callable-callback-long-flags--array-options

To be clear, this project works just fine with all loop implementations, including the default StreamSelectLoop and ExtUvLoop. This potential adapter could take advantage of some of the optimizations inside libuv and avoid some of the known limitations of the project.

In particular, this may help with Windows support (#9) in the future because libuv supports pipes with overlapped mode on Windows. Note that a Windows build of ext-uv does not appear to be available at the time of writing this, but it is believed to change again in the future (https://github.com/bwoebi/php-uv/issues/63).

clue avatar Apr 22 '19 11:04 clue

Note that I've fixed the building on windows for php-uv.

bwoebi avatar Apr 28 '19 16:04 bwoebi

See also @CharlotteDunois's excellent version here: https://github.com/AndromedaGalaxy/reactphp-libuv-process

clue avatar Apr 26 '20 19:04 clue