Netflix/RxJava — pull request #235 by benjchristensen (2013-04-17 05:44:35+00:00)
Title: Schedulers Interface (Merging and Adding to Pull Request 229)

Merging and adding to pull request https://github.com/Netflix/RxJava/pull/229 from @jmhofer which adds functionality discussed in the Scheduler issue https://github.com/Netflix/RxJava/issues/19

Work done in https://github.com/Netflix/RxJava/pull/229 added the following methods to `Scheduler`:

- `Subscription schedule(T state, Func2 action, long delayTime, TimeUnit unit)`
- `Subscription schedule(T state, Func2 action)`

These are in fact the primary methods from RxNet (http://msdn.microsoft.com/en-us/library/hh211963(v=vs.103).aspx) and the others are just helper overloads.

It seems beneficial to use these 2 methods for actual implementation logic while all other methods are just decorating and forwarding from AbstractScheduler to these methods.

I propose these changes on top of pull request https://github.com/Netflix/RxJava/pull/229 to achieve this.

I also added unit tests that @mairbek created (https://github.com/Netflix/RxJava/pull/229#issuecomment-16115941).

All unit tests are passing … but we don't yet have enough unit test coverage so I won't be surprised if bugs are found.