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

FileSystemNode.DataStream should be marked Obsolete #30

Closed
Arlodotexe opened this issue Dec 17, 2023 · 1 comment
Closed

FileSystemNode.DataStream should be marked Obsolete #30

Arlodotexe opened this issue Dec 17, 2023 · 1 comment

Comments

@Arlodotexe
Copy link
Collaborator

Arlodotexe commented Dec 17, 2023

Calling .Result on an asynchronous method, especially for a property getter where it isn't obvious this is happening, risks deadlocking the thread that called it.

return IpfsClient?.FileSystem.ReadFileAsync(Id).Result;

This property needs to marked as Obsolete and removed in a future update. Consumers should call IpfsClient?.FileSystem.ReadFileAsync(Id) directly.

Originally reported in the #ipfs-shipyard channel in the UWP Community Discord server.

@Arlodotexe
Copy link
Collaborator Author

Closed in #34

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