SpinLock shouldn't call ReflectionBus directly, as it
makes it very difficult to use a custom front-end to
Bus and have control over it. In particular, I use
werx in a web application and in order to cleanly
shutdown werx and its threads, I need to have my own
Bus implementation to have access to the channel map.
I need direct access to the channel map to be able to
iterate through its channels and shut them down (if you
know of a better way, I'd be grateful).
The problem is SpinLock calls ReflectionBus directly,
which creates at least one other thread that I cannot
access to shutdown. ReflectionBus doesn't provide a
stop() method and doesn't expose the channelmap in any
way so I cannot shut it and its channels down.
Logged In: YES
user_id=603803
This is an excellent suggestion and now that the bus has
been refactored I will add this in. While that wasn't
considered a bug because it wasn't anticipated that the bus
would be used sans ReflectionBus, there is absolutely no
good reason why the Bus shouldn't be used by itself. The RB
is just a convenience mechanism after all.