exposing SingleAssignmentDisposableValue and making it ICancelable by Fijo · Pull Request #1630 · dotnet/reactive (original) (raw)
Are you sure we should make it implement ICancelable? As far as I can tell, every endpoint that accepts an implementation of ICancelable would end up boxing this value, defeating the point of using a value type.
If there were cases where generic methods imposed a constraint, it might be different, but Rx doesn't appear to do that anywhere. So I'm wondering if the reason this type was defined as not implementing ICancelable was to make it less likely that people would accidentally box it by passing it to methods that accept an ICancelable.