fix: ensure Topic#publish1 returns accurate result during concurrent closure#3665
fix: ensure Topic#publish1 returns accurate result during concurrent closure#3665guptapratykshh wants to merge 4 commits intotypelevel:mainfrom
Conversation
|
@mpilquist can you have a look at this PR , Thanks. |
|
Need to rebase this PR now that other PRs have been merged. Also, need to remove the |
da8bc03 to
bd2981e
Compare
bd2981e to
a30644f
Compare
|
@TomasMikula Mind reviewing this PR? Thanks! |
|
So this PR guarantees that
whereas the failing test also requires that
I admit the test is somewhat strict, and I'd consider the implemented behavior acceptable if clearly documented that return value |
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Minor thing: I think constructing the effect in a right-associative way will lead to slightly faster execution for an IO-like F.
|
@guptapratykshh So you went full on to satisfy the test as is (as opposed to relaxing the test as suggested above). My main concern with this implementation is that
These might be breaking changes for existing users. |
this pr ensures Topic#publish1 accurately returns Left(Closed) when delivery fails due to concurrent topic closure by checking individual subscriber channel results and also guarantees that Right(()) response from publish1 consistently signifies successful delivery to all currently registered subscribers.
Resolves #3644