fixd
fixd copied to clipboard
Create a Broadcaster
The current broadcast-subscribe process with Simple can be improved. Instead of starting a new thread for each subscriber, and having that subscriber thread block on a queue of broadcasts, we can have a single broadcaster thread that starts at startup. Subscribers, with a reference to the Response, register with the broadcaster. This way, the Container can simply create a subscriber and give it to the broadcaster and return immediately.
There is an issue here, related to the fact that subscribe-broadcast setups can include every() and after().