Skip to content

Can ObservableProperty work perfectly with aysnc method? #1059

Closed Answered by bzd3y
ali50m asked this question in Q&A
Discussion options

You must be logged in to vote

You're welcome. What support are you wondering about? I think what you are trying to do is supported. You can use the void async like I initially suggested, IF you don't need any code after the property is set to wait for the async to complete.

If you do, then your options are:

  1. Write your own concurrency mechanism using something like TaskCompletionSource. This would still require you to await some other Task, so it probably doesn't buy you anything over just setting the property and then calling ReloadDbUsers manually, although it does let you easily switch between awaiting it or not.
  2. Use a method like UpdateDbPathAsync() to set the path and then call ReloadDbUsers. This is the simplest…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@ali50m
Comment options

@bzd3y
Comment options

Answer selected by ali50m
@ali50m
Comment options

@bzd3y
Comment options

Comment options

You must be logged in to vote
2 replies
@bzd3y
Comment options

@ali50m
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants