-
Notifications
You must be signed in to change notification settings - Fork 4
Add ItemDropped callback to ChannelOptionsBase
#76
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
Conversation
|
💚 CLA has been signed |
|
I guess I've signed the CLA, but I haven't received any confirmation |
|
Oh, never mind, it updated when I commented |
1da3590 to
81601a1
Compare
|
Sorry for the delay, @Prunkles . Thanks for contributing this PR. In principle, it's okay and something we should add, but I'd like to consider where we should include this option a bit further. |
This decision was made based on the
Also, I thought about it a bit more, and I think I was wrong, at least because that So I think the current placement is the most appropriate |
Mpdreamz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks @Prunkles !
There is no way to detect when an event is dropped due to
BufferOptions.BoundedChannelFullModebeing set to drop.Starting with some version of
System.Threading.Channels, anitemDroppedcallback was added to theBoundedChannel. So I added aBufferItemDroppedcallback to theChannelOptionsBase.This callback would fit better in the
BufferOptions, but because it requires aTEvent, it would also need to be added to theBufferOptions. I am not sure if it is affordable, because of how many things depend onBufferOptionsbeing without generic parameters.