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

you should extend the \Jenner\SimpleFork\Process and overwrite the run method #15

Open
Jim-Raynor opened this issue Feb 15, 2018 · 2 comments

Comments

@Jim-Raynor
Copy link

https://github.com/huyanping/simple-fork-php/blob/4af8f61b283a612492ca9ab790472309ce681156/src/FixedPool.php#L34

Attempt to run process, constructed with Runnable, cause exeception "you should extend the \Jenner\SimpleFork\Process and overwrite the run method" from FixedPool::execute()

@HorstBrack
Copy link

Had the same problem.
I did what I was told and created an extension like this:
class JobRunner extends \Jenner\SimpleFork\Process { function __construct($job) { parent::__construct($job); } }
Then use this class instead:
$pool->execute(new JobRunner(new OneJob())
Don't know what this is good for but it works....

@white-poto
Copy link
Owner

white-poto commented May 4, 2018

Thanks.
I have been too busy. If possible can you create a pull request?

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

No branches or pull requests

3 participants