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

Documentation: mention bootstrap file for workers #201

Open
vikingjs opened this issue Apr 18, 2024 · 0 comments
Open

Documentation: mention bootstrap file for workers #201

vikingjs opened this issue Apr 18, 2024 · 0 comments

Comments

@vikingjs
Copy link

It would have saved me a significant amount of time in development if I had known that I could supply a bootstrap file for workers. The documentation AND ERROR MESSAGES use "MUST be loadable by the composer class loader", which is not true. That guidance caused me to go through hoops when a simple one-line bootstrap file importing my autoloader would have sufficed.

Instead, all I had to do was:

	$workerFactory = new ContextWorkerFactory(__DIR__ . '/../Task/bootstrap.php');
	$this->workerPool ??= new ContextWorkerPool(50, $workerFactory);

I shouldn't have to stumble upon an important feature like that while reverse-engineering your library for another reason.

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

No branches or pull requests

2 participants