Aaron Piotrowski
c55f34c551
Update for krakjoe/parallel interrupt branch
...
Dumped the signal socket.
2019-02-15 18:25:29 -06:00
Aaron Piotrowski
638a1bb638
Implement thread killing
...
Will not interrupt blocking calls such as sleep, but in practice this shouldn't be much of a problem.
2019-02-14 18:12:51 -06:00
Aaron Piotrowski
23669b9572
Add reference/unreference methods to ChannelledSocket
2019-02-14 18:09:13 -06:00
Aaron Piotrowski
c60fc63cb6
Add timer in parallel context for kill breakpoint
2019-02-14 01:10:40 -06:00
Aaron Piotrowski
2d35051391
Update for krakjoe/parallel changes
2019-02-14 00:56:27 -06:00
Aaron Piotrowski
410c88e859
Serialize function arguments
...
Maybe this is a horrible idea, but we serialize everything else, so why not?
2019-02-14 00:34:45 -06:00
Aaron Piotrowski
ecaf0a854b
Add support for krakjoe/parallel
2019-02-14 00:34:45 -06:00
Aaron Piotrowski
398989d41d
Move test scripts to Fixtures directory
2019-02-13 18:19:46 -06:00
Aaron Piotrowski
c77843fa77
Catch parse error and provide better error message
2019-02-13 16:36:45 -06:00
Aaron Piotrowski
9b17d540a9
Move ConstantTask to Fixtures directory
2019-02-13 14:17:52 -06:00
Aaron Piotrowski
6b6e38cf70
Define constants in contexts for easy identification
2019-02-13 14:15:16 -06:00
Aaron Piotrowski
1ee8e202ed
Apply the same treatment to context exceptions
...
Sends info about previous exceptions thrown in the context to the parent.
2019-01-25 17:53:19 -06:00
Aaron Piotrowski
9236ade19f
Capture previous exceptions of exceptions thrown from Task::run()
2019-01-25 14:29:32 -06:00
Andrey Bolonin
11e46e0c27
Add PHP 7.3 on Travis ( #58 )
2019-01-10 18:47:24 +01:00
Niklas Keller
687776dc69
Adjust AppVeyor to PHP 7.3
2019-01-09 22:31:46 +01:00
Aaron Piotrowski
80c07011d6
Fix failing Process::join()
...
If the process is killed while joining, an exception was thrown from Process::kill().
2019-01-09 10:25:30 -06:00
Aaron Piotrowski
beafcdb140
Close channel in process when ended
...
Also restored destructor to DefaultPool to immediately kill workers instead of waiting until the end of the process.
2019-01-09 09:28:31 -06:00
Aaron Piotrowski
dc036dfa33
Use Promise\wait() in process-runner.php
2019-01-04 16:58:05 -06:00
Aaron Piotrowski
65d71c3526
Check for resolution of promise in process-runner.php
2019-01-04 16:46:53 -06:00
Aaron Piotrowski
ccf285bdcc
Cleanup test
2018-12-30 13:32:25 -06:00
Aaron Piotrowski
30b9a05691
Fix some doc links
2018-12-30 13:15:01 -06:00
Aaron Piotrowski
c0e6875b61
Add more worker docs
2018-12-30 13:10:58 -06:00
Aaron Piotrowski
f391d3549a
Improve error message when parent has exited
2018-12-30 13:08:38 -06:00
Aaron Piotrowski
2ac081575e
Wait for pending task in shutdown
2018-12-30 12:48:54 -06:00
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