Skip to content

Instantly share code, notes, and snippets.

@pennyfx
Created March 10, 2013 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pennyfx/5131052 to your computer and use it in GitHub Desktop.
Save pennyfx/5131052 to your computer and use it in GitHub Desktop.
dsfadf
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