Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help #1

Open
TwinMist opened this issue Sep 15, 2016 · 1 comment
Open

Help #1

TwinMist opened this issue Sep 15, 2016 · 1 comment
Labels

Comments

@TwinMist
Copy link

TwinMist commented Sep 15, 2016

Hi Wondered if you could help me. Trying to use you php-multitasking code to try and replace some processParallel code with uses pcntl_fork and keep getting defunct

addWorker( function (WorkerInfo $info) { echo "hello"; }, 10 ); // add 10 workers to the manager $man->run(); // all workers will be executed in order, no more than 2 workes will be running at the same time $man->wait(); i keep getting PHP Catchable fatal error: Argument 1 passed to {closure}() must be an instance of WorkerInfo, instance of Oasis\Mlib\Multitasking\WorkerInfo given in how do i get this to say hello 10 times. many thanks
@TwinMist TwinMist changed the title Helo Help Sep 16, 2016
@no7mks
Copy link
Contributor

no7mks commented Sep 18, 2016

Hi,

I guess it's because you didn't import the WorkerInfo class with a use statement.

try add the following line after require_once:

use Oasis\Mlib\Multitasking\WorkerInfo;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants