diff --git a/README.md b/README.md index 65d51cd..d0f48e4 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,9 @@ on a webserver. Tasks can communicate back to the main process during execution and handle results and errors gracefully. +This library is not supported on Windows due to a lack of essential features. The autodetect falls back to the +sync worker on Windows, so running tasks should be possible, but running tasks in parallel does not work. + * [Installation](#installation) * [Basic Example](#basic-example) diff --git a/src/Taskmaster.php b/src/Taskmaster.php index 8231ee4..3f4a5a0 100644 --- a/src/Taskmaster.php +++ b/src/Taskmaster.php @@ -465,7 +465,7 @@ public function autoDetectWorkers(int $count, bool $loadFromEnv = true, bool $al if (!$worker) { if (extension_loaded("pcntl")) { $worker = new ForkWorker(); - } elseif (function_exists("proc_open")) { + } elseif (function_exists("proc_open") && PHP_OS_FAMILY !== "Windows") { $worker = new ProcessWorker(); } else { $worker = new SyncWorker();