Last post Jan 20, 2020 03:35 PM by discoverynr
Jan 16, 2020 05:44 AM|discoverynr|LINK
I was trying to use the c# equivalent of a promise to have signalr client send a message to hubMethod1, have hubMethod1 respond back to client, have client send message to hubMethod2, and have hubMethod1 await the calling of hubMethod2. The problem is that hubMethod2
is not called until hubMethod1 returns (completes). I'm basically trying to use two hub methods and async await to get a return value from a signalr client to the hub.
I really want to try to get this to work instead of just using two totally separate hub methods to try to accomplish a single task.
Jan 17, 2020 09:03 PM|deepalgorithm|LINK
Perhaps you can
Not sure how you implemented the C# equivalent of the promise, but you want to avoid using Task.Wait or any other blocking call.
Jan 20, 2020 03:35 PM|discoverynr|LINK
I was actually able to accomplish this using answers at
in order to complete the promise I have a second hub method that runs the line of code
and this second hub method is called by a second hubconnection, and the TaskCompletionSource is a public static variable at the Program.cs level