github/ReactiveCocoa — pull request #150 by joshaber (2012-11-29 17:16:34+00:00)
Title: Scheduler improvements

:warning: **PREEMPTIVE** :warning:

A start on solving #94, #136.

Alright so here's an attempt at fleshing out `RACScheduler`.

It does a couple things:

* Adds `+currentScheduler`.
* Adds support for recursion elimination with `+immediateScheduler`.
* We can now only use GCD queues that we own.

My current thinking is that all subscriptions would use the `+subscriptionScheduler` so that we can ensure that by the time we're in a `didSubscribe` block, we can determine the `+currentScheduler`.

This would enable us to fix #94 by deferring the re-subscription on the current scheduler.
It supports #136 by making concurrency explicit with the option of creating a serialized scheduler from a concurrent scheduler.

So where are the holes in this? Does this really address the problems? What sorts of crazy edge cases do we need to test?