Commit Graph

204 Commits

Author SHA1 Message Date
Aaron Piotrowski
3908cbcdc2 Make things work 2022-02-06 09:54:03 -06:00
Aaron Piotrowski
0c9fdff967 Initial WIP 2022-02-06 00:30:41 -06:00
Aaron Piotrowski
53e59efd1d Use ContextFactory in DefaultWorkerFactory
Eliminates WorkerProcess and WorkerParallel static constructor classes.
2021-12-26 00:45:30 -06:00
Aaron Piotrowski
66415c5599 Update Parcel interface, add LocalParcel
Changed Parcel to require a Closure to match our other APIs.
2021-12-24 11:49:23 -06:00
Aaron Piotrowski
b318b3eb82 Move ExitResult classes into inter 2021-12-22 16:59:30 -06:00
Aaron Piotrowski
85b8f3de16 Make TaskWorker final 2021-12-22 15:11:41 -06:00
Aaron Piotrowski
31c89218a9 Various cleanup 2021-12-21 23:06:26 -06:00
Aaron Piotrowski
dab42d75db Remove unnecessary future 2021-12-21 19:08:14 -06:00
Aaron Piotrowski
a45aa6370d Refactor worker tasks to have a communication channel 2021-12-20 17:24:13 -06:00
Aaron Piotrowski
2a9b8e7122 Better names for context and worker functions 2021-12-18 21:21:26 -06:00
Aaron Piotrowski
7bc74d24f5 Add Context suffix to Context classes 2021-12-18 09:45:08 -06:00
Aaron Piotrowski
d3c59d4bd7 Remove deprecated exceptions 2021-12-18 09:15:25 -06:00
Aaron Piotrowski
13c85413fe Remove Environment
Cache can do the same job now.
2021-12-18 00:27:37 -06:00
Aaron Piotrowski
e2b444a004 Rename enqueue to execute and remove enqueueCallable 2021-12-17 23:55:25 -06:00
Aaron Piotrowski
1e881bf01f Update for amphp/process beta 2 2021-12-17 17:31:05 -06:00
Aaron Piotrowski
becad2ca48 Update for amphp/process beta 2021-12-16 23:21:25 -06:00
Aaron Piotrowski
758eaa45c2 Add LocalChannel and refactor Channel
Channels can now call receive multiple times, but they cannot send null, as this is now used to indicate the channel has closed, similar to pipelines and streams.
2021-12-12 10:30:42 -06:00
Aaron Piotrowski
350c769ab0 Update for recent dependency changes 2021-12-11 09:59:42 -06:00
Bob Weinand
b7b70d205a Update for recent renames 2021-12-04 16:36:25 +01:00
Aaron Piotrowski
8b048caa71 Return a Future from Channel::send() 2021-11-21 12:27:07 -06:00
Aaron Piotrowski
54ca955c69 Support cancellation of channel receives 2021-11-21 11:55:58 -06:00
Aaron Piotrowski
2466d78fd6 Update for rename of coroutine to launch 2021-11-20 15:07:13 -06:00
Niklas Keller
b625c1a226 Simplify test 2021-10-25 19:27:15 +02:00
Aaron Piotrowski
f3b2e4bad0 Update for removal of Revolt\launch 2021-10-18 11:15:13 -05:00
Aaron Piotrowski
3602a615ce Update for Amp and Revolt changes 2021-10-15 16:49:03 -05:00
Aaron Piotrowski
e47e788e17 Update for Revolt changes and Futures 2021-09-17 14:50:57 -05:00
Niklas Keller
477025c44d Use revolt 2021-03-27 08:05:02 +01:00
Aaron Piotrowski
c79efa6249 Fix compatibility with ext-parallel 2020-12-02 13:30:58 -06:00
Aaron Piotrowski
ae9feed176 Remove Generator to coroutine support for Task::run() 2020-11-15 23:08:15 -06:00
Aaron Piotrowski
8da6fea46c Replace missed yields with await()
Support for coroutines removed from AsyncTestCase.
2020-11-09 11:31:23 -06:00
Aaron Piotrowski
59a8822403 Refactor for Amp v3 2020-10-07 23:04:29 -05:00
Aaron Piotrowski
69f9cadba8 Test needs PHPUnit >=8.4 2020-10-07 12:11:25 -05:00
Aaron Piotrowski
e759ef0c76 Async task resolution 2020-10-07 12:11:25 -05:00
Aaron Piotrowski
131c11e173 Add support for cancelling tasks 2020-10-07 12:11:25 -05:00
Aaron Piotrowski
839e30cf0a Refactor pool queue
Improved enqueue tasks to a busy pool. `Pool::getWorker()` now returns `Promise<Worker>` instead of `Worker`.
2020-10-07 12:11:24 -05:00
Niklas Keller
6fdd90d97c Improve ProcessHub accept watcher
Relates to #112.
2020-04-23 22:23:59 +02:00
Niklas Keller
b722da1d5a Fix tests 2020-04-23 21:30:44 +02:00
Aaron Piotrowski
33648c50c4 Fix nested call to Promise\wait() in test 2020-04-20 11:06:55 -05:00
Aaron Piotrowski
81b72bbeac Add error trigger if a worker fails 2020-04-07 15:26:46 -05:00
Aaron Piotrowski
7f00b8effb Use new amphp/serialization library 2020-04-02 23:26:16 -05:00
Aaron Piotrowski
2c76f0f101 Update ThreadedParcelTest 2020-03-06 09:45:19 -06:00
Aaron Piotrowski
d378e7bf78 Update expected exception messages 2020-03-06 09:44:37 -06:00
Aaron Piotrowski
f5cb1e87e8 Add Serializer interface 2020-03-06 09:31:40 -06:00
Aaron Piotrowski
21a674ab0c Attach last error to exception message
Also related to #100.
2020-03-04 11:08:07 -06:00
Aaron Piotrowski
6e310d0219 Update shared memory error handling
Related to #100.
2020-02-27 23:19:55 -06:00
Aaron Piotrowski
26f869734a CS Fix 2020-02-14 18:31:01 -06:00
Aaron Piotrowski
d706f1db2f Add ContextFactory 2020-02-14 17:22:41 -06:00
Aaron Piotrowski
53a97cbd92 Expand context & task exceptions 2020-02-14 12:55:38 -06: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