You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I talked to @vlthr and I think everyone agrees that the current system is a mess. I'd even go as far as to say that the current method for deciding the receiver of a message needs fixing. Notably the use of both the _bindings defaultdict in Dispatcher as well as the chain method which is a completely different way to dispatch messages.
As I've understood it from reading the current Dispatcher implementation:
bind binds a agent as a listener to the activity on a chosen selector (currently nothing more than the msg["type"]), which is essentially a pubsub channel which anybody can write to but which requires registration/subscription in order to read messages (messages are dispatched instantly, there is no dispatch history for each individual selector and they are removed from the queue as soon as they are processed).
chain makes messages flow through a series of agents, however it seems to destructively overwrite agent.target for all agents involved (see [line 41]), which is a bit worrying.
Setting
self.target
in every agents__init__
is nasty, there was a discussion of moving it to the Agent base class but for some reason we didn't...Why?
The text was updated successfully, but these errors were encountered: