Obvious/closure-library — pull request #5 by fat (2013-07-10 00:49:07+00:00)
Title: if disposing pubsub during publish, queue keys for removal post publish

@dpup || @nicks

So after looking more into how pubsub works – i decided to just fix how dispose retires internal objects (rather than the tombstone/mutex stuff that events does, which would be a significantly larger refactor).

This instead relies on the `pendingKeys_` locking mechanism when a `publishDepth_` is present.

Also, after publishing, their is a check to see if the object was disposed during publish, which cleans up the subscriptions/topics/pendingKeys