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
Aaron Piotrowski
abaa1609fd
Improve error message for invalid channel data
2018-01-22 16:12:55 -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
Aaron Piotrowski
cdf84999aa
Update context test
2017-12-26 23:16:30 -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
acdfa66b12
Rename test file with parse error so php-cs-fixer ignores it
2017-12-13 14:21:37 -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
2a09f82f39
Add more process tests; exclude scripts from coverage
2017-12-13 13:56:11 -06:00
Aaron Piotrowski
cb87b1cd9a
Use default sizes as default values
2017-12-12 21:59:38 -06:00
Aaron Piotrowski
4d99a9d968
spawn → run
2017-12-10 17:01:10 -06:00
Aaron Piotrowski
852f580915
Remove $this magic from Thread callback
...
Channel is now passed as the first argument.
2017-12-10 16:53:51 -06:00
Aaron Piotrowski
4d4841f449
Refactor Process to make writing child processes simple
2017-12-10 16:39:49 -06:00
Aaron Piotrowski
4426686e54
Reorganize
2017-12-07 21:26:55 -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
e3b1cfd0cf
Allow custom binary path or locate binary
2017-12-05 18:21:39 -06:00
Aaron Piotrowski
d0a3001c6a
Fix a couple mistakes…
2017-11-29 15:07:00 -06:00
Aaron Piotrowski
3aff92fec4
Consolodate process and thread contexts into Context namespace
2017-11-29 15:01:32 -06:00
Aaron Piotrowski
33a5b89ff7
Refactor Parcels
2017-11-29 14:40:07 -06:00
Aaron Piotrowski
996654920d
Update for export of mutex and semaphore to amphp/sync
2017-11-29 14:12:28 -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
dbd3403087
Quiet style fixer
2017-11-10 11:35:47 -06:00
Aaron Piotrowski
aaee76e3da
Rename Threading namespace to Thread
2017-11-10 10:00:04 -06:00
Aaron Piotrowski
f48066eb1b
Drop Fork along with Process and Strand interfaces
...
Forking is just too dangerous for virtually no gain over Process. Context now extends Sync\Channel.
2017-11-10 09:59:23 -06:00
Aaron Piotrowski
0ef74413af
Fix updating TTL; add more environment tests
2017-07-29 10:29:16 -05:00
Aaron Piotrowski
84b611e780
Move ExitResult classes out of Internal namespace
2017-07-28 17:34:24 -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
Aaron Piotrowski
998a255c83
Quiet CS fixer… remove used import
2017-06-19 11:24:39 -05:00
Aaron Piotrowski
b536f8da56
Send large buffer instead of delaying
2017-06-19 11:14:38 -05:00
Niklas Keller
4f7da94194
Use delay instead of checking the resolution value for sending to exited context
2017-06-19 08:25:41 +02:00
Aaron Piotrowski
0b16820ca8
Check for exit when sending as well
2017-05-28 00:09:13 -05:00
Niklas Keller
2e9a29ae1c
Apply Amp's code style
2017-05-18 09:51:31 +02:00
Aaron Piotrowski
c7294da60d
Reorganize exception classes and add TaskError
...
TaskError is thrown if the exception thrown in the worker was an instance of Error.
2017-05-17 23:13:29 -05:00