Aaron Piotrowski
d7697ebd69
Gracefully shutdown workers on process exit
2018-12-30 12:38:17 -06:00
Eugene Leonovich
7a6e2aa8fd
Ignore the travis directory on export
2018-12-27 23:07:47 +01:00
Aaron Piotrowski
1c9822a564
Fix #66
2018-12-19 18:47:43 -06:00
Max Furtuna
c4eed9535b
Test for #66
2018-12-19 18:34:06 -06:00
Niklas Keller
a5ae5b8d26
Fix headlines in docs
2018-11-19 22:58:51 +01:00
Pieter Hordijk
354e64db09
Fixed typo in exception message
...
When the process cannot be started it tells me "Staring the process failed".
You can stare at a process all you want, but it should be "Starting".
2018-11-08 14:29:35 -06:00
Pieter Hordijk
b9d6720c83
Fixed examples ( #61 )
...
* Fixed examples
CallableTask expects the parameters to be passed in as array
* Fixed worker-pool example
The task does not make available the arguments (anymore)
2018-11-08 14:29:07 -06:00
Aaron Piotrowski
f56e461200
Fix title
2018-11-04 11:37:19 -06:00
Aaron Piotrowski
d18779beb0
Add initial process docs
2018-11-04 11:35:49 -06:00
Aaron Piotrowski
596f41886b
Return PID from Process::start()
2018-11-04 11:34:18 -06:00
Niklas Keller
c774d2ded1
Add custom tasks to navigation
2018-11-04 18:07:58 +01:00
Niklas Keller
46a1afddb4
Add custom task docs
2018-11-04 18:03:27 +01:00
Niklas Keller
3f8436cada
Improve documentation
2018-11-04 10:17:19 -06:00
Niklas Keller
912047f2ec
Add CallableTask and enqueueCallable
2018-11-04 10:17:19 -06:00
Aaron Piotrowski
4c3c93e46a
Fix DefaultPool::shutdown()
...
Forgot to update this to match Worker::shutdown() behavior.
2018-10-27 11:19:01 -05:00
Aaron Piotrowski
eff56fb849
Unreference process I/O streams
2018-10-27 11:14:31 -05:00
Aaron Piotrowski
d783e13fa4
Store exit status promise
...
Return this promise from subsequent calls to shutdown().
2018-10-27 09:59:10 -05:00
Aaron Piotrowski
60e0213904
Update functions test for rename
2018-10-27 09:56:09 -05:00
Aaron Piotrowski
7961e6a13a
AbstractWorker → TaskWorker
2018-10-26 18:29:45 -05:00
Aaron Piotrowski
1c1d22b7f6
Pool::get() → Pool::getWorker()
...
Also renamed Worker\get() to Worker\pool()->getWorker().
2018-10-25 09:54:40 -05:00
Aaron Piotrowski
9098d26b56
Declare return type on exists()
2018-10-25 09:38:38 -05:00
Aaron Piotrowski
8caf8d4dce
Fix missed exception construct
2018-10-24 23:02:24 -05:00
Aaron Piotrowski
3f2e6d7f07
Drop custom exception constructors
2018-10-24 22:49:01 -05:00
Aaron Piotrowski
87d728ea35
Fix argument order
...
Oddly PhpStorm didn't highlight this as wrong.
2018-10-24 22:35:27 -05:00
Aaron Piotrowski
31cbd9f197
Update examples
2018-10-24 22:31:47 -05:00
Aaron Piotrowski
a5c08a2041
Pause before exiting thread in test
...
Not sure why exiting immediately allows the write to succeed.
2018-10-24 11:13:42 -05:00
Aaron Piotrowski
9197b9f0eb
Update channel tests
2018-10-23 22:44:02 -05:00
Aaron Piotrowski
fe293c09bb
Improve process communication error handling
2018-10-23 22:14:51 -05:00
Aaron Piotrowski
14def89bff
Improve error messages when unserializable data is used
2018-10-23 22:10:12 -05:00
Aaron Piotrowski
3c0baa4e43
Remove catch of ChannelException
...
This catch block may hide errors that the user makes. If the parent died, another exception will be generated and caught below when trying to send the ExitFailure object.
2018-10-23 21:28:24 -05:00
Aaron Piotrowski
fd6c531d87
Add eof check on STDIN
2018-10-23 21:26:26 -05:00
Aaron Piotrowski
fe4df13ab9
Forward stdout and stderr from worker to parent
...
Restores previous behavior of process contexts when used in a worker.
2018-10-23 10:11:16 -05:00
Aaron Piotrowski
b562925e6d
Do not yield context start
2018-10-22 14:46:47 -05:00
Aaron Piotrowski
f74626d26a
Add test command to composer
2018-10-22 09:36:12 -05:00
Aaron Piotrowski
f1b0a59b86
Final all the things!
2018-10-21 10:54:46 -05:00
Aaron Piotrowski
83cd550895
Remove method kept for BC in DefaultPool
...
Mark DefaultPool::pull() as private and entire class as final.
2018-10-21 10:42:55 -05:00
Aaron Piotrowski
69d4cde4a6
Remove unnecessary pool error test classes
...
The single test method should have been part of the existing abstract pool test.
2018-10-21 10:41:30 -05:00
Aaron Piotrowski
0d85b5a149
supported() → isSupported()
2018-10-21 10:34:32 -05:00
Aaron Piotrowski
79a4f979f4
Update examples
2018-10-21 10:34:08 -05:00
Aaron Piotrowski
e72a50dc8d
Upgrade to latest amphp/process release
...
STDOUT and STDERR of a child process is no longer automatically piped to STDOUT and STDERR of the parent. Instead these streams are available on Context\Process for the user to determine how they should be handled.
2018-10-21 10:25:29 -05:00
Aaron Piotrowski
cb2aa9c59c
Use 127.0.0.1 instead of localhost
...
Avoids DNS lookup issues on Windows.
2018-10-21 10:09:28 -05:00
Aaron Piotrowski
8d60fdbb64
Trigger error in process runner before exiting
2018-10-21 10:03:26 -05:00
Aaron Piotrowski
bf08e2fdf4
Remove output buffering in child process; update require scoping
2018-10-15 00:15:56 -05:00
Aaron Piotrowski
fa864692e7
Read key in chunks
...
Not entirely sure if this is necessary given the expected length, but it doesn't hurt either.
2018-10-11 18:11:02 -05:00
Aaron Piotrowski
9db273d484
Unset key if process connect times out; update docblocks
2018-10-11 11:14:14 -05:00
Aaron Piotrowski
4cf26d4dfb
Authenticate worker when connecting to IPC
2018-10-10 18:31:34 -05:00
Aaron Piotrowski
9e40d3aa0c
Use TCP for IPC on Windows
2018-10-09 09:12:23 -05:00
Aaron Piotrowski
562ae6f68d
Remove AbstractWorker::cancel() and report worker as running on start
2018-10-08 12:27:18 -05:00
Aaron Piotrowski
5987d844c8
Kill pool if still running on destruct
2018-10-07 10:16:49 -05:00
peter279k
4b438814f3
Enhance worker tests ( #43 )
2018-10-07 10:15:50 -05:00