zesterer / flume

A safe and fast multi-producer, multi-consumer channel.
https://crates.io/crates/flume
Apache License 2.0
2.47k stars 85 forks source link

Add `Sender::force_send` #143

Open BTOdell opened 8 months ago

BTOdell commented 8 months ago

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.

zesterer commented 8 months ago

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 commented 5 months ago

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?