1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-02 09:37:57 +01:00
Commit Graph

110 Commits

Author SHA1 Message Date
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
Aaron Piotrowski
cc6f785fa9 Pause → Delayed 2017-05-10 23:45:02 -05:00
Aaron Piotrowski
fbb665a954 Remove unused imports 2017-05-10 23:40:52 -05:00
Niklas Keller
b148a20257 Update to latest Amp and byte-stream changes 2017-05-10 09:05:35 +02:00
Aaron Piotrowski
c753d1bf6e Allow more time for kill 2017-04-24 10:47:53 -05:00
Aaron Piotrowski
19d8cf79a1 Update ChannelledStream
Refactor of ReadableStream means ChannelledStream needed to change significantly.
2017-04-16 10:12:42 -05:00
Aaron Piotrowski
8a18a7a7b8 Require both params in constructor 2017-03-25 01:19:46 -05:00
Aaron Piotrowski
99c876f522 Update for stream changes 2017-03-23 19:25:35 -05: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
774a42376d Fix risky test 2017-03-21 23:25:45 -05:00
Aaron Piotrowski
6c0078b915 Update to PHPUnit 6 and use helper package 2017-03-21 23:19:15 -05:00
Aaron Piotrowski
9bf978ad01 when() → onResolve() 2017-03-21 18:45:23 -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
c16a015562 Convert ChannelException to ContextException 2017-03-09 16:15:30 -06:00
Aaron Piotrowski
b51e4f7ba6 ExitStatus → ExitResult 2017-01-16 23:24:59 -06:00
Aaron Piotrowski
7554767d6a Stream → ByteStream 2017-01-09 11:11:46 -06: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
fa8985d7e3 Remove dependency on amphp/socket 2016-08-30 18:27:14 -05: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