admin管理员组

文章数量:1377570

I'm using Laravel Octane with OpenSwoole, and I'm trying to run nested Octane::concurrently() calls. However, I keep getting this error:

OpenSwoole\Server::taskWaitMulti(): taskWaitMulti method can only be used in the worker process

Here’s the code that produces the error:

Octane::concurrently([
    'outer_concurrency' => function () {
        return Octane::concurrently([
            'inner_result' => function () {
                return 1;
            },
        ]);
    },
]);

It seems like Octane is trying to execute taskWaitMulti() outside a worker process. Is nested concurrency not supported in OpenSwoole, or am I missing something?

Any insights or workarounds would be appreciated`

本文标签: phpLaravel OctaneOpenSwoole taskWaitMulti error in concurrently()Stack Overflow