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

Fixed shared memory writing and fork losing received messages #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghola
Copy link

@ghola ghola commented Mar 16, 2016

Two issues fixed:

  1. The Fork was losing received messages. When waiting it does a ::receive and does nothing with the result. The fix was to add a messages collection to the form and have the ::receive populate that collection. This way messages can be retrieved at any time using ::getMessages.
  2. Shared memory was creating imbricated arrays with each ::send making the Fork::receive end up with array in array in array, etc. instead of a flat array of messages.

@ghola ghola force-pushed the fork-messages branch 3 times, most recently from b01c68f to 5151098 Compare March 17, 2016 13:19
@ghola
Copy link
Author

ghola commented Mar 17, 2016

Getting the builds to pass seems to be a matter of luck, even on the master. They randomly fail for various php versions but always on the same test: ProcessManagerTest::testLargeBatchProcessing.

gtgt added a commit to gtgt/spork that referenced this pull request Jan 30, 2019
Merge kriswallsmith#40: Fixed shared memory writing and fork losing received messages
TheLevti added a commit to TheLevti/phpfork that referenced this pull request Feb 9, 2020
TheLevti added a commit to TheLevti/phpfork that referenced this pull request Feb 9, 2020
### Changed

- 27d0cc4: Add vendor namespace prefix and improve README.md.

### Fixed

- kriswallsmith#40: Do not lose fork messages after receive call.
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

Successfully merging this pull request may close these issues.

None yet

1 participant