Created
March 10, 2013 23:49
-
-
Save pennyfx/5131052 to your computer and use it in GitHub Desktop.
dsfadf
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
heartBeat = new Task(() => | |
{ | |
while (true) | |
{ | |
string token = "token-" + _nextHeartbeatId++; | |
_session.RequestHeartbeat(new HeartbeatRequest(token), | |
() => Console.WriteLine("Successfully requested heartbeat: " + token), | |
failureResponse => { throw new Exception("Failed"); }); | |
heartBeat.Wait(new TimeSpan(0, 0, 30)); | |
} | |
}); | |
heartBeat.Start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment