You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, congrats for the .NET API for Matrix! It worked really well with the Console example and is nice to have a SDK developed in .NET. I was making some testes with the sdk and when using UWP it hangs out here:
public MatrixRequestError Get (string apiPath, bool authenticate, out JToken result)
{
apiPath = GetPath (apiPath,authenticate);
Task task = client.GetAsync(apiPath); //Here more exactly
var res = RequestWrap(task);
res.Wait();
result = res.Result.result;
return res.Result.error;
}
I looked around the code and one (not nice) solution would be immediately after each Async httpclient task like GetAsync/PostAsync, to call task.Wait(). Of course if you make Async methods you could use the await keyword with the async methods when calling them.
I didn't implement it because I think you know better than I what to do in the SDK and you know Matrix/Synapse much much better than I. Keep on the good job and please don't let me alone in the .NET! 😄
The text was updated successfully, but these errors were encountered:
I had the same problem with WPF. You can get around this issue by creating a new thread, and doing all Matrix stuff on that thread, but that is a bit of a hack. I think the only real solution to this problem is just refactoring everything to async.
Hello!
First, congrats for the .NET API for Matrix! It worked really well with the Console example and is nice to have a SDK developed in .NET. I was making some testes with the sdk and when using UWP it hangs out here:
The GetAsync function will never return.... and it will hang everything around after that. The reason is explained here:
https://stackoverflow.com/questions/10343632/httpclient-getasync-never-returns-when-using-await-async/10351400#10351400
I looked around the code and one (not nice) solution would be immediately after each Async httpclient task like GetAsync/PostAsync, to call task.Wait(). Of course if you make Async methods you could use the await keyword with the async methods when calling them.
I didn't implement it because I think you know better than I what to do in the SDK and you know Matrix/Synapse much much better than I. Keep on the good job and please don't let me alone in the .NET! 😄
The text was updated successfully, but these errors were encountered: