Commit Graph

118 Commits

Author SHA1 Message Date
Aaron Piotrowski
7f8ca5472d Add DelegatingWorkerPool
Some checks are pending
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, on Windows, windows-latest, nts, 8.3) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, on macOS, macos-latest, nts, 8.3) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.1) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.2) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.3) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (none, true, with ext-parallel, ubuntu-latest, parallel, ts, 8.2, none, none) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (none, true, with ext-parallel, ubuntu-latest, parallel, ts, 8.3, none, none) (push) Waiting to run
2024-09-01 09:40:09 -05:00
Aaron Piotrowski
0dfd136a17 Increase timeout before cancellation
Avoids race condition with parent cancellation check not submitting task to worker.
2024-01-28 12:37:41 -06:00
Aaron Piotrowski
e705d00643 Do not submit cancelled tasks
Fixes #198.
2024-01-28 12:37:41 -06:00
Aaron Piotrowski
f013263aff Thread worker tests 2023-12-27 12:33:25 -06:00
Aaron Piotrowski
470293d4b4 Adjust some tests for Windows CI 2023-12-27 12:24:54 -06:00
Aaron Piotrowski
ba11031b86 Increase timeout for CI 2023-05-21 22:33:27 -05:00
Aaron Piotrowski
1988e109ab Fix awaiting worker creation 2023-05-21 21:46:59 -05:00
Aaron Piotrowski
37850ff591 Fix assigning workers to waiting tasks
Fixes #177.
2023-05-12 17:42:36 -05:00
Niklas Keller
a072e63c3f Fix and re-enable windows CI 2023-03-02 15:59:10 -06:00
Aaron Piotrowski
a4edad0d08 Add await() shortcut to Execution
Renamed getResult() to getFuture()
2023-02-14 21:30:55 -06:00
Niklas Keller
c17135c866 Remove getLimit from WorkerPool interface
Closes #160.
2023-02-14 21:35:06 +01:00
Niklas Keller
abf5fe195b Rename DefaultWorker* to ContextWorker* 2023-02-14 21:31:30 +01:00
Niklas Keller
a4b23892a1 Remove ipcHub()
Users should use the factories instead.

Closes #163.
2023-02-14 21:19:44 +01:00
Aaron Piotrowski
b19d87fc50 Remove cache from Task::run() 2023-02-06 17:41:20 -06:00
Aaron Piotrowski
bedca5d7af Switch Cache to AtomicCache in Task::run() 2023-02-04 10:07:27 -06:00
Aaron Piotrowski
1905ce8dbe Remove Cache class type from worker factory 2023-02-04 09:30:33 -06:00
Aaron Piotrowski
7581a05b8b Add cancellation to context factory 2023-01-02 12:51:22 -06:00
Aaron Piotrowski
12b2ea3de1 Forward Xdebug settings to child process 2023-01-01 15:12:34 -06:00
Aaron Piotrowski
35204df750 Improve handling of exceptions thrown in child contexts 2022-12-31 15:45:42 -06:00
Aaron Piotrowski
9e5eec211a Declare strict types 2022-12-17 15:49:26 -06:00
Aaron Piotrowski
12f64252d6 Remove unused test
ParallelContext was removed.
2022-12-17 15:48:16 -06:00
Aaron Piotrowski
7ba0dd24de Fix pushing dead worker back into pool 2022-11-28 22:13:52 -06:00
Aaron Piotrowski
c3bb2452c2 Add a couple tests 2022-08-07 12:01:21 -05:00
Niklas Keller
c40cd9735f Replace all with await 2022-07-12 22:41:33 +02:00
Aaron Piotrowski
7cf3733a02 Update CS fixer version and apply new rules 2022-03-28 17:18:28 -05:00
Niklas Keller
a583a90eaa Increase timings for macOS 2022-02-06 23:50:53 +01:00
Niklas Keller
9a67f8f272 Improve parameter order in DefaultWorkerFactory 2022-02-06 22:58:34 +01:00
Niklas Keller
3e0f355a45 Rename pooledWorker → getWorker 2022-02-06 22:39:56 +01:00
Niklas Keller
5348d43129 Rename Job → Execution, enqueue → submit 2022-02-06 22:31:15 +01:00
Niklas Keller
83fa2ec8d3 Rename maxSize to limit 2022-02-06 19:20:05 +01:00
Aaron Piotrowski
446e9a7313 Move ext-parallel classes to internal namespace for now 2022-02-06 11:22:33 -06:00
Aaron Piotrowski
5d8a9deeca Low-hanging fruit 2022-02-06 11:06:00 -06:00
Aaron Piotrowski
aa9d387385 Rename ContextFactory::create to start 2022-02-06 10:09:10 -06:00
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
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
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
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
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