Hannes Magnusson [2010-06-27 13:16 UTC]The .tgz is a .tar, not gzipped.. :)
Till Klampaeckel [2010-06-27 14:36 UTC]Maybe you want to pair your efforts with System_Daemon?
Michael Gauthier [2010-07-05 18:53 UTC]Nice proposal. I'd say it stands on its own apart from System_Daemon as both have different use-cases. As it stands, this looks like a handy pseudo-multi-threading implementation.
1.) run code through phpcs. It will pick up trivial formatting errors that will prevent PEAR acceptance. For starters:
- constants do not need to be prefixed with _
- format using spaces, not tabs
- lines inside <?php and ?> do not need indentation
- methods need scope specifieds, protected, public, etc.
- all methods and variables should use camelCase, not under_scores.
2.) package name should be System_MultiThreading
3.) package.xml is needed to make it a pear installable package. People in #pear efnet IRC, or on email@example.com can help you write this.
6.) classes should be in separate files
7.) Use PEAR_Log instead of your own logger class
8.) Consider a license other than the PHP license. The PHP license is not well suited to userland PHP code. Consider the Apache, MIT or BSD licenses instead. Apache, in particular, is quite similar to the PHP license.
Dmitry Belyaev [2010-07-06 17:07 UTC]Thanks for comments. Especially to Michael Gauthier.
- Fixed formatting.
- Removed unnecessary code.
- License changed to BSD.
- Added methods to exchange user defined values between parent process and threads.
- Examples added.
And is it necessary to create package.xml now? Yet this package is not included to a pear package.