Skip to content

Instantly share code, notes, and snippets.

@kolesnick
Created January 21, 2015 17:14
Show Gist options
  • Save kolesnick/0239832a6bca80cbbe02 to your computer and use it in GitHub Desktop.
Save kolesnick/0239832a6bca80cbbe02 to your computer and use it in GitHub Desktop.
using (var readTimeout = new CancellationTokenSource())
{
readTimeout.CancelAfter(this.defaultTimeout); // not used so far
currentSlice = AsyncContext.Run(
() => connection.ReadStreamEventsForwardAsync(EventsPrefix + id.FormatGuid(), nextSliceStart, batchSize, false));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment