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

BehaviorInterceptor and state #26706

johanandren opened this issue Apr 10, 2019 · 0 comments


None yet
2 participants
Copy link

commented Apr 10, 2019

Currently a user could be tempted to add mutable state to an interceptor, but the instance will be shared for each spawned actor where it is used.

I think we should either clearly document that you must not put mutable state in it, or make Behaviors.intercept take a factory ensuring (or at least providing guard rails) that a new instance is used for each spawned typed actor.

It is possible we have existing internal interceptors where this has been missed (timers, supervision)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.