Skip to content

Instantly share code, notes, and snippets.

View james-world's full-sized avatar

James World james-world

View GitHub Profile
@james-world
james-world / Rx Recovering from an error
Last active August 29, 2015 14:07
Rx example demonstrating recovering from a stream error
We couldn’t find that file to show.
@james-world
james-world / Implementation.cs
Last active August 29, 2015 14:07
This is an answer to a StackOver question on Rx - see the link in the comments. It deals with detecting from a stream of item status updates when one item has been stuck in a particular state for too long.
using System;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using Microsoft.Reactive.Testing;
using NUnit.Framework;
namespace SOStuck
{
public class StuckDetectorTests : ReactiveTest
{
@james-world
james-world / Timeout.cs
Created October 8, 2014 08:43
How to watch a bad task and not fall into the cancellation token trap!
using System;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
using System.Threading;
using System.Threading.Tasks;
namespace AsyncEvil
{
class Program
{