Created
March 21, 2017 11:39
-
-
Save jonstodle/ad333e5a944104276998abde2027ce5f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Console.WriteLine("Starting on thread ".PadLeft(26) + Thread.CurrentThread.ManagedThreadId.ToString()); | |
Func<Unit> writeLineAndReturnUnit = () => | |
{ | |
Console.WriteLine($"Inside Return on thread ".PadLeft(26) + Thread.CurrentThread.ManagedThreadId.ToString()); | |
return Unit.Default; | |
}; | |
Observable.Return(writeLineAndReturnUnit(), TaskPoolScheduler.Default) | |
.Do(_ => Console.WriteLine("Passing through on thread ".PadLeft(26) + Thread.CurrentThread.ManagedThreadId.ToString())) | |
.Subscribe(_ => Console.WriteLine($"Received on thread ".PadLeft(26) + Thread.CurrentThread.ManagedThreadId)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment