-
Notifications
You must be signed in to change notification settings - Fork 34
[WIP] Implement Blocking lists. #14
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
base: master
Are you sure you want to change the base?
Conversation
* FIX: do not exit the event loop prematurely. * Upgrade promises and evenement. * Add new Type\RedisList class (adds unshift and pop events to SplDoublyLinkedList). * Pass the loop to Business\Lists (for use by Clue\React\Block). * Return Type\RedisList from Storage for lists.
…ecial type. This fixes a problem when multiple clients block on the same list.
…e active, pass just the key to blockers and wake them up once the length has been retrieved.
…ynchronously write the response when a promise is returned.
@pwhelan Thanks for your work, I really like the progress you're making here! I'll mark this as WIP for now and will keep an eye on this. Make sure to send me a ping and/or remove the WIP marker if you have any questions or feel this needs a review 👍 |
Yeah. I've had to repeatedly rethink the approach behind it. It seems to be good enough now to run the unit tests for one of my projects. I also have a hashes branch based off of this one. |
@clue the one last remaining bit to fix is with the timeouts. I was thinking of somehow exposing the timeout value to the Invoker, thoughts? |
I finished the blocking lists implementation. In the process I had to upgrade and add the following packages:
I created a wrapper class for SplDoublyLinkedList with the EventEmitterTrait. That should make how I implementated it pretty obvious.