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
Aaron Piotrowski
526916d13c
Ignore multiple shutdown() calls; remove cancel() param
2018-10-07 09:56:09 -05:00
Aaron Piotrowski
b654463339
Fix code style
2018-10-07 09:50:45 -05:00
Aaron Piotrowski
394eeb6ac0
Update thread test
2018-10-07 09:32:04 -05:00
Aaron Piotrowski
cb5ea736d4
Improve process IPC
...
Processes now use a shared server socket instead of stdin and stdout for IPC.
2018-10-07 09:31:35 -05:00
Aaron Piotrowski
ca051a0aa6
Fail queued tasks after shutdown is invoked
2018-10-07 09:23:42 -05:00
Aaron Piotrowski
d81b6fccd2
Fix circular reference in BasicEnvironment ( Fixes #56 )
2018-10-07 09:23:13 -05:00
Niklas Keller
d309d97fdb
Ignore docs/asset on export
...
Relates to amphp/amp#227
2018-05-16 22:24:45 +02:00
Niklas Keller
72d0391adf
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2018-05-16 16:15:52 +02:00
Gabriel Caruso
02a3b84f8f
Use dedicated PHPUnit assertions
2018-03-21 21:54:05 +01:00
Niklas Keller
7326946884
Symlink PHARs if they don't have a .phar extension
2018-03-21 15:37:51 +01:00
Niklas Keller
b4cdb95f58
Fix test after error message change
2018-03-21 13:56:19 +01:00
Niklas Keller
c1114188b6
Improve error messages
2018-03-21 13:49:52 +01:00
Aaron Piotrowski
ed3662172d
Added signal() and getPid() methods to Process
2018-03-14 18:51:13 -05:00
Markus Staab
dbdc7895ac
Fixed typo ( #42 )
2018-02-27 23:26:51 +01:00
Markus Staab
1d6330ffc7
Fixed typo ( #41 )
2018-02-27 20:02:22 +01:00
Chris Wright
11a3e27db5
Escape script path in Process command ( #38 )
2018-01-31 18:31:36 +01:00
Aaron Piotrowski
7ef75bd5db
Reduce test iterations
...
pthreads seems to be having trouble with such quick generation of threads. Will look into what may be happening here… but the number of iterations isn't terribly important for the modified test.
2018-01-22 17:59:13 -06:00
Aaron Piotrowski
4cbdddd052
Fix code style
2018-01-22 17:36:50 -06:00
Syed Irfaq R. ⚡️
d2b9c03318
Fixes #35 ( #36 )
2018-01-22 16:15:09 -06:00
Aaron Piotrowski
abaa1609fd
Improve error message for invalid channel data
2018-01-22 16:12:55 -06:00
Niklas Keller
d16da4611e
Fix usage inside PHARs
2018-01-22 15:03:31 +01:00
Aaron Piotrowski
0d40e6da98
Do not fclose socket or null thread ref; restore GC test
2017-12-27 12:36:28 -06:00
Aaron Piotrowski
e6a5de671a
Move GC test to ProcessPoolTest
2017-12-27 12:17:35 -06:00
Aaron Piotrowski
0a474e18c0
Avoid cyclic references in threads
2017-12-26 23:16:44 -06:00
Aaron Piotrowski
cdf84999aa
Update context test
2017-12-26 23:16:30 -06:00