Skip to content

Conversation

@akarnokd
Copy link
Collaborator

This PR adds some additional eager dispose checks to ControlScheduler to see if either the Control object or the returned IDisposable has been disposed.

Fixes: #269

if (action == null)
throw new ArgumentNullException(nameof(action));

if (_control.IsDisposed) return Disposable.Empty;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line please

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curly braces too? I like curly braces as it avoids accidentall fall-throughs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@clairernovotny clairernovotny merged commit ffc086e into dotnet:master May 26, 2018
@akarnokd akarnokd deleted the ControlSchedulerDisposeCheckFix branch May 26, 2018 15:09
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.

3 participants