Created
April 9, 2013 19:46
-
-
Save luisrudge/5348761 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Chat : Hub | |
{ | |
public void LoadPlotData() | |
{ | |
ThreadPool.QueueUserWorkItem(x => { | |
var firstPlotData = Db.LoadFirstPlotData(); | |
Clients.Caller.firstPlotDataRetrieved(firstPlotData); | |
}); | |
ThreadPool.QueueUserWorkItem(x => { | |
var secondPlotData = Db.LoadSecondPlotData(); | |
Clients.Caller.secondPlotDataRetrieved(secondPlotData); | |
}); | |
} | |
public void LoadTableData() | |
{ | |
ThreadPool.QueueUserWorkItem(x => { | |
var firstTableData = Db.LoadFirstTableData(); | |
Clients.Caller.firstTableDataRetrieved(firstTableData); | |
}); | |
ThreadPool.QueueUserWorkItem(x => { | |
var secondTableData = Db.LoadFirstTableData(); | |
Clients.Caller.secondTableDataRetrieved(secondTableData); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment