Skip to content

Commit

Permalink
Error and EOF fixes
Browse files Browse the repository at this point in the history
- Fix unexpected EOF exception on close.
- Fix standard error output across requests.
  • Loading branch information
ssigwart committed Jun 4, 2024
1 parent 4d82d89 commit d4f588d
Show file tree
Hide file tree
Showing 7 changed files with 759 additions and 591 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.DS_Store
/*.komodoproject
/*.code-workspace
/vendor
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,12 @@ $pool->setMaxNumSpareProcesses(3);
The pool process should implement `ssigwart\ProcessPool\ProcessPoolProcessMessageHandlerInterface`.
The `handleRequest` function should handle incoming requests.
It can output to `stdout` and `stderr`, which can be read with `getStdoutResponse` and `getStderrResponse`.

## Sending a Message to the Pool
```php
$req1 = $pool->startProcess();
$req1->sendRequest('Your message');
$req1->getStdoutResponse();
$req1->getStderrResponse();
$pool->releaseProcess($req1);
```
Loading

0 comments on commit d4f588d

Please sign in to comment.