JQuery example for calling SignalR Async Task
问题 Does anyone have a working example of a JQuery based client calling an async task based method on a SignalR Hub? See the code below from the SignalR Doco for an example of a server side async task. public Task<int> AsyncWork() { return Task.Factory.StartNew(() => { // Don't do this in the real world Thread.Sleep(500); return 10; }); } 回答1: Here is an example * at server side: * public void AsyncWork() { // start working in a new thread var task = Task.Factory.StartNew(() => dosomething());