[Obsolete] IWithBoundedStash > IWithStash #6511
[Obsolete] IWithBoundedStash > IWithStash #6511eaba wants to merge 4 commits intoakkadotnet:devfrom eaba:warning_CS0618_`IWithBoundedStash`
IWithBoundedStash > IWithStash #6511Conversation
…dedDeque-based mailbox instead."
Aaronontheweb
left a comment
There was a problem hiding this comment.
Didn't we just have a PR where we tried to do this prior to v1.5? cc @Arkatufus @ismaelhamed
| { | ||
| if (actorType.Implements<IWithBoundedStash>()) | ||
| if (actorType.Implements<IWithStash>()) | ||
| return new BoundedStashImpl(context); |
There was a problem hiding this comment.
IWithStash must resolve to an unbounded deque mailbox by default, which is how it is configured in the hocon (L466)
@Aaronontheweb I don't think this code has ever worked as intended, because BoundedStashImpl and UnboundedStashImpl are the exact same implementation.
Unless I'm missing something we could simply it:
public static class StashFactory
{
private class StashSupport : AbstractStash
{
public StashSupport(IActorContext context)
: base(context)
{ }
}
public static IStash CreateStash(this IActorContext context) => new StashSupport(context);
}
There was a problem hiding this comment.
There was a problem hiding this comment.
IWithStash resolves to an unbounded deque by default, which is why it is falling. It is not a replacement for IWithBoundedStash. See its documentation.
|
@eaba closing this PR - just suppress the warnings where they show up. No one users this feature much anyway. |
|
Actually, per @Arkatufus suggestion - remove the |
Actually, it's telling how to properly create a working bounded stash. If you only rely on the |
I'm out of my depth here - would you care to send a PR? |
|
Sure thing, I'll see if I can find some time tomorrow. |
|
Superseded via #6519 |

Changes
"Use
IWithStashwith a configured BoundedDeque-based mailbox instead."Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):
Latest
devBenchmarksInclude data from the relevant benchmark prior to this change here.
This PR's Benchmarks
Include data from after this change here.