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

Make consumer interruptable #393

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

GDmac
Copy link

@GDmac GDmac commented Nov 30, 2018

Use pcntl_signal_dispatch instead of declare ticks which has lots of overhead.

@GDmac
Copy link
Author

GDmac commented Nov 30, 2018

I've added some extra commits because PHPstorm was complaining about return values for consumer methods and the possibility inside invoke of rejectDispatch() throwing again. The essence is consumer not declaring ticks and driver using time_nanosleep() to make it interruptable. The nanosleep needs to be ported to the other drivers which i can't test (mongo, reddis, etc)

Copy link
Member

@acrobat acrobat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me! @GDmac can you explain a bit what the difference is between the ticks and pcntl_signal_dispatch? Does the current test suite cover this code/change enough or should we add an extra test to make sure we don't break the current setup?

@GDmac
Copy link
Author

GDmac commented Aug 26, 2019

See my comments (before making this branch :-D) #306 (comment)
ticks is very CPU-intensive

@acrobat
Copy link
Member

acrobat commented Aug 26, 2019

Thanks @GDmac! Ok for me @sagikazarmark 👍

- deprecated assertDirectoryNotExists => assertDirectoryDoesNotExist
- add missing property private $BaseDir
@GDmac
Copy link
Author

GDmac commented Feb 18, 2021

rebased on current master

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.

2 participants