1
0
mirror of https://github.com/danog/parallel.git synced 2024-11-30 04:39:01 +01:00
Commit Graph

113 Commits

Author SHA1 Message Date
6afbe00dd6
Custom php.ini for webserver 2020-02-11 23:52:07 +01:00
a5d4270acb
Better tests 2020-02-11 23:41:35 +01:00
c851a13dbf
Implement web forking 2020-02-11 23:18:06 +01:00
Aaron Piotrowski
82ade8b128
Hide testing bool from public API 2020-02-11 10:38:30 -06:00
4d783f5e59
Skip FIFO tests on windows 2020-02-11 15:00:02 +01:00
59dfc74967
Merge branch 'master' of github.com:amphp/parallel into fifo 2020-02-11 14:45:32 +01:00
Aaron Piotrowski
09ab72333b
Increase test timeout
Parallel threads only check for kills every 250 ms, so this can fail.
2020-02-10 17:40:52 -06:00
Aaron Piotrowski
dfb7b0149b
Add test delay to allow process to crash
Sending to fast can succeed before process crashes.
2020-02-10 17:40:34 -06:00
76853f0b78
Implement FIFO process hub 2020-02-10 23:33:17 +01:00
Aaron Piotrowski
4ed05f6aac
Improve error handling when sending and receiving 2020-02-10 12:29:27 -06:00
Aaron Piotrowski
2b418eb71d
Improve error message for non-autoloadable callables
Fixes #83.
2019-08-27 18:28:31 -05:00
Aaron Piotrowski
24213ee911
Upgrade to PHPUnit 7 or 8 2019-08-27 12:17:41 -05:00
Aaron Piotrowski
7303b8dcf3
Fix exiting parallel context 2019-04-30 14:47:37 -05:00
Aaron Piotrowski
740696275c
Add a couple tests and ignore some blocks only executed in threads 2019-03-08 13:37:52 -06:00
Aaron Piotrowski
7c8f936618
Autoloading → Bootstrap
Calling the file a boostrap makes more sense as more than defining an autoloader can be done in the file.
2019-02-22 16:10:30 -06:00
Aaron Piotrowski
7c8756c3a5
Add custom autoloader option for workers
Fixes #55 and #71.
2019-02-20 17:39:39 -06:00
Aaron Piotrowski
5deeb81501
Skip parallel worker tests if extension is not installed 2019-02-18 10:27:07 -06:00
Aaron Piotrowski
f919371aee
Don't swallow SynchronizationError in ContextException 2019-02-18 09:38:42 -06:00
Aaron Piotrowski
f2e5224856
Unite Process and Parallel context interfaces
Allows scripts to be written for either context.
2019-02-17 23:50:41 -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
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
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
ccf285bdcc
Cleanup test 2018-12-30 13:32:25 -06:00
Max Furtuna
c4eed9535b
Test for #66 2018-12-19 18:34:06 -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
60e0213904
Update functions test for rename 2018-10-27 09:56:09 -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
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
14def89bff
Improve error messages when unserializable data is used 2018-10-23 22:10:12 -05:00
Aaron Piotrowski
b562925e6d
Do not yield context start 2018-10-22 14:46:47 -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
562ae6f68d
Remove AbstractWorker::cancel() and report worker as running on start 2018-10-08 12:27:18 -05:00
peter279k
4b438814f3
Enhance worker tests (#43) 2018-10-07 10:15:50 -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
Gabriel Caruso
02a3b84f8f Use dedicated PHPUnit assertions 2018-03-21 21:54:05 +01:00
Niklas Keller
b4cdb95f58 Fix test after error message change 2018-03-21 13:56:19 +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