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

Add Sender::force_send #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BTOdell
Copy link

@BTOdell BTOdell commented Mar 16, 2024

Closes #142

I haven't added any tests yet because I didn't know which test files to add them to.
I'd like to just add a couple smoke tests.

@@ -432,6 +436,42 @@ struct Chan<T> {
}

impl<T> Chan<T> {
#[inline(always)]
Copy link
Author

Choose a reason for hiding this comment

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

I included this line to ensure there isn't a performance degradation from extracting out this function from the existing code.

@zesterer
Copy link
Owner

Hi, thanks for the PR! I'll try to find time to review this in the next few days.

One thing I would say is that there are some invariants to maintain here: in particular, send_timeout expects to be able to pull the old value back out of the queue afterwards, so care will need to be taken to not accidentally violate this.

@YuanYuYuan
Copy link

Hi there! I came across the discussion and found that we implemented the lossy channel in a similar way. It would be nice if flume officially support this feature. Is there any reason this PR is being blocked or anything needs help?

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.

Add a force_send() function to flume::Sender?
3 participants