Netflix/RxJava — pull request #648 by akarnokd (2013-12-20 20:34:03+00:00)
Title: Reentrant scheduling2

Revised version of PR #643.

- Added ```scheduleRunnable()``` overloads to ```Scheduler``` directly to avoid constant wrapping between ```Runnable``` and ```Action0```.
- Removed the helper interface.
- Reworked ```ReentrantScheduler``` to work with a parent scheduler directly.
- Replaced ```ForwardSubscription``` with ```IncrementalSubscription``` as the first one didn't correctly managed the orderly nature of swapping subscriptions: an unfortunate thread scheduling could have swapped in an older subscription before a new subscription.

In my opinion, the ```Scheduler``` and its implementations should use ```Runnable``` as the internal unit of work instead of ```Action0```. Since the ```Executor```s require ```Runnable``` anyway, less wrapping means less memory and better performance. The ```Scheduler``` interface can retain the ```Action0``` overloads but no other implementation should need to deal with them.