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
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
14def89bff
Improve error messages when unserializable data is used
2018-10-23 22:10:12 -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
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
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
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
Niklas Keller
ac4c7939f0
Add test for proper clean up
...
If there are cyclic references in the future again, this test will fail.
2017-12-26 10:02:43 -06:00
Aaron Piotrowski
c545be1dc5
More tests
2017-12-13 23:06:38 -06:00
Aaron Piotrowski
f4411805d6
Fail task with SerializationException; cancel worker if sending otherwise fails
2017-12-13 20:56:28 -06:00
Aaron Piotrowski
9e7d1e0801
Throw if sending task fails
2017-12-13 16:29:44 -06:00
Aaron Piotrowski
312aecf1ff
Remove Worker::start()
...
The context can automatically be started when a job is enqueued.
2017-12-13 14:14:31 -06:00
Aaron Piotrowski
cb87b1cd9a
Use default sizes as default values
2017-12-12 21:59:38 -06:00
Aaron Piotrowski
6be72c6754
Run tasks in-order
...
Tasks on Windows must be run in-order because STDIO pipes are blocking. IPC be refactored to use sockets in the future if desired.
2017-12-06 15:59:28 -06:00
Aaron Piotrowski
d1b8524f31
Add async task test
2017-12-05 18:37:33 -06:00
Aaron Piotrowski
e700395ac5
Better fix for #27
...
Assertions would crash the worker, this will return as a failed task.
2017-11-22 21:38:11 -06:00
Aaron Piotrowski
0ef74413af
Fix updating TTL; add more environment tests
2017-07-29 10:29:16 -05:00
Aaron Piotrowski
a027ef930b
Test for AMP_WORKER to be defined
2017-07-27 23:49:43 -05:00
Aaron Piotrowski
3d5e1c6e6f
Refactor BasicEnvironment
...
Remove \Countable, add tests.
2017-07-27 23:47:36 -05:00
Niklas Keller
2e9a29ae1c
Apply Amp's code style
2017-05-18 09:51:31 +02:00
Aaron Piotrowski
9cb6359de3
Allow more time for kill
...
Threads only check once every 250 ms.
2017-03-21 23:33:40 -05:00
Aaron Piotrowski
6c0078b915
Update to PHPUnit 6 and use helper package
2017-03-21 23:19:15 -05:00
Aaron Piotrowski
0236fc5336
Kill worker forks
...
Forking for workers is just not a good idea… it's too likely to be used irresponsibly.
2017-03-16 17:33:30 -05:00
Aaron Piotrowski
6a8eb2130e
Update for async-interop merge and other Amp changes
2017-03-16 17:03:59 -05:00
Aaron Piotrowski
f5ebd6b435
Update for async-interop namespace change
2017-01-09 11:11:25 -06:00
Aaron Piotrowski
9deb8e3f8c
Update for removal of Amp loop wrapper functions
2016-12-29 19:20:19 -06:00
Aaron Piotrowski
71f8d2016d
Drop strict types
2016-12-29 19:16:04 -06:00
Aaron Piotrowski
6d88d87fe0
Awaitable → Promise
2016-11-14 17:43:44 -06:00
Aaron Piotrowski
ce25a0179d
Rename to Parallel
2016-08-23 16:47:40 -05:00
Aaron Piotrowski
b924fc2b6e
Code cleanup
2016-08-22 18:25:19 -05:00
Aaron Piotrowski
c068a5ae38
Use strict types; fix tests
2016-08-21 23:40:48 -05:00
Aaron Piotrowski
70097cb225
Update tests; code cleanup
2016-08-18 17:36:58 -05:00
Aaron Piotrowski
da84a772cf
Port to Amp
2016-08-18 11:04:48 -05:00