-
Notifications
You must be signed in to change notification settings - Fork 826
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
Added remove_if to priority channel #3523
base: main
Are you sure you want to change the base?
Conversation
|
Can you give me a bit more information on how you would implement your second point? I'm using the que as some items need to sent in order, such as multiple log events. Most everything else simply needs priority. And these items really only need to send the latest information, so the older information can be dropped off it had not been sent yet. Is this something you want to merge, or should I just implement it specifically for my project? |
Filtering/selectors are not unusual when using queues, but I think this should only be on the receiver end. One alternative is to use one queue per case you wish to filter on. On the sender side you can anyway filter before you push so there's not really a need for additional APIs there. |
To be clear, what I think would make sense is:
|
Okay thanks. I'll update the pr soon 👍 |
I've updated this removing the sender from using the function. It doesn't seem to be building for some reason. Any idea why this is getting stuck? |
Added remove_if to priority channel. This allows removing items from the queue if there is a match in the predicate.
You can also do this on a sender, receiver and the channel directly itself.
In my sample code I use the following:
This is for my issue here: #3431