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

Drop as soon as no readers will read the value #1

Open
Amjad50 opened this issue Feb 21, 2024 · 0 comments
Open

Drop as soon as no readers will read the value #1

Amjad50 opened this issue Feb 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Amjad50
Copy link
Owner

Amjad50 commented Feb 21, 2024

The current behavior of the channel has a small issue for dropping behavior.

Currently, the values in the buffer will only be dropped when its overwritten, thus if the values used are expensive allocations
it will be helped by the channel until its overwritten by another value.

Would be nice to implement a smart behavior to drop the value as soon as the last possible reader reads it.

Maybe this could be implemented by keeping track of how many readers are possible at each node (keep track of number of readers?)

@Amjad50 Amjad50 added the bug Something isn't working label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant