Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
Class Subscription is parameterized by token type, but in all use cases (in HandlerContainer class) it is used with type erasure, and the .unsubscribe() method checks for all possible subscription tokens manually. This is unsafe and hard to read. A safer mechanism is to use a new SubscriptionHandler class and deprecate and remove the old subscription logic.