Skip to content

Conversation

@bartdesmet
Copy link
Collaborator

One more bit of #nullable support. All of the helpers for IDisposable operations are rather gnarly given their excessive use of ref because of the underlying Volatile and Interlocked operations. Luckily we can flow nullable analysis through this using various attributes. In particular:

  • read-only uses of ref (which could be in if the underlying APIs were to use in) can be annotated to ensure null-invariance;
  • assignments through ref can be annotated to inherit their null-ness from the value being assigned.

@bartdesmet bartdesmet merged commit bade573 into main Oct 7, 2020
@bartdesmet bartdesmet deleted the dev/bartde/rx_nullable_disposable_utils branch October 7, 2020 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants