Shared stream#1328
Conversation
|
Has there been any additional progress on this recently? I happen to be looking for this exact feature. |
|
I haven't done anything more with this. I would like some feedback on my approach before I put more effort into polishing it. |
|
@cramertj, @MajorBreakfast any thoughts on this? |
265e6d5 to
4dc527e
Compare
4dc527e to
7b6a36e
Compare
91e9c3e to
bc8d2bd
Compare
bc8d2bd to
ba5157a
Compare
2d96b5e to
f19ca59
Compare
|
Is this PR still being worked on? I ran into several more cases over the past two years where this API could be useful. I'm willing to take over this PR and help drive it to completion if the original author is away. @cramertj, any thoughts on this? |
|
I'm still around. It's been a while since I looked at this, but I was waiting on feedback from the maintainers. |
f19ca59 to
4bb28a3
Compare
|
Looks like the shared |
|
Sure thing, @tmccombs! I'll write a few, perhaps based on the tests for |
|
@tmccombs I didn't get around to writing tests for this, unfortunately, but it seems that the current commit is failing in CI due to a |
4bb28a3 to
ad4cea8
Compare
|
@ebkalderon those clippy lints are for code I didn't touch, and making the suggested change results in an "or-patterns syntax is experimental" error on stable rust. |
|
Got it! Thanks for clarifying and updating the branch. I'll get started writing some tests and open a PR against your fork. |
ad4cea8 to
eb1b793
Compare
eb1b793 to
9875351
Compare
|
Conflicts have been resolved and this is up-to-date with current master. |
|
The failed miri test looks like it is probably unrelated, but I'm not completely sure. |
|
Any updates? |
9d19cfc to
ffae074
Compare
88913ca to
873749c
Compare
|
@XLordalX your comment got me to revisit this, and I wrote some tests, which led to finding some bugs which I have now fixed, and reworked it a fair amount. It is still failing CI. Something about a race condition found with thread sanitization. I don't really understand it yet. I would kind of like some feedback from the futures maintainers to know if this a direction worth pursuing. And, to be honest, I kind of hope someone comes along and says there is a simpler way to do it. |
632f931 to
033ebe2
Compare
|
@taiki-e You able to look at this? |
8431d10 to
3af17a1
Compare
|
hmm, looks like builds are currently broken on master. |
3af17a1 to
60140a1
Compare
This comment has been minimized.
This comment has been minimized.
So that we can also use it for stream/shared
60140a1 to
8c2adf0
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
8c2adf0 to
2de9c42
Compare
And fix bug with wrong operator
I don't completely understand why the stronger ordering is needed, but it seems to fix the data races detected by the thread sanitizer.
2de9c42 to
fe7be26
Compare
3481a0d to
dc16318
Compare
This is similar to #1217 but uses an underlying boxed slice to buffer items, and as a side-effect has a finite buffer size.
This is a work in progress. I'd still like to add some more rigorous unit tests, but I'd like feedback on my general approach, and have other eyes check my logic.