Skip to content

Commit f89230a

Browse files
committed
fall back to sync worker on windows
1 parent d12f73e commit f89230a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on a webserver.
1515

1616
Tasks can communicate back to the main process during execution and handle results and errors gracefully.
1717

18+
This library is not supported on Windows due to a lack of essential features. The autodetect falls back to the
19+
sync worker on Windows, so running tasks should be possible, but running tasks in parallel does not work.
20+
1821
<!-- TOC -->
1922
* [Installation](#installation)
2023
* [Basic Example](#basic-example)

src/Taskmaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ public function autoDetectWorkers(int $count, bool $loadFromEnv = true, bool $al
465465
if (!$worker) {
466466
if (extension_loaded("pcntl")) {
467467
$worker = new ForkWorker();
468-
} elseif (function_exists("proc_open")) {
468+
} elseif (function_exists("proc_open") && PHP_OS_FAMILY !== "Windows") {
469469
$worker = new ProcessWorker();
470470
} else {
471471
$worker = new SyncWorker();

0 commit comments

Comments
 (0)