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

INotifyPropertyChanged.TaskCompleted is null #11

Closed
StephenCleary opened this issue Jan 29, 2015 · 2 comments
Closed

INotifyPropertyChanged.TaskCompleted is null #11

StephenCleary opened this issue Jan 29, 2015 · 2 comments
Assignees
Milestone

Comments

@StephenCleary
Copy link
Owner

(From Andy):

Firstly - thank you so much for your very useful library.

I am developing a WinRT app and using your NotifyTaskCompletion classes.
I note that the INotifyPropertyChanged.TaskCompleted property comment says:
"This property never changes and is never null"

However, when mocking up some data using Task.FromResult I have observed INotifyPropertyChanged.TaskCompleted set to null.

In the NotifyTaskCompletionImplementation ctor I see that the TaskCompleted property is only set if (!task.IsCompleted)

Is the comment wrong and should I check Execution.IsCompleted before awaiting Execution.TaskCompleted or is this a bug?

@StephenCleary
Copy link
Owner Author

Yes, I would say the implementation is wrong. I'll get a fix out.

@StephenCleary StephenCleary added this to the 3.0.1 milestone Feb 21, 2015
@StephenCleary
Copy link
Owner Author

This should be fixed in 3.0.1-pre: https://www.nuget.org/packages/Nito.AsyncEx/3.0.1-pre

TaskCompleted will now be set to TaskConstants.Completed if the source task is already completed. Didn't take the time to write unit tests for this type, though. Let me know if this is still a problem.

@StephenCleary StephenCleary self-assigned this Jun 30, 2016
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

No branches or pull requests

1 participant