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
Currently there is, at most, one event queue per main loop and every event is delivered to every handler waiting for this event class. In case when multiple streams would be handled in the same loop, objects related to one stream would receive events generated by all other streams. The can cope with that by checking event.stream, but this is not quite optimal.
The idea:
mark events with a 'domain' they belong to. The 'domain' could be any object, e.g. the Client instance for a client session
event handler objects would have a event_domain attribute. If it is not None events belonging to other domains would not be delivered to this object. Instead of event_domain we could also have event_domains list to allow a handler belong to many domains
handlers with no domain would receive every event, events with no domain would be delivered to every handler – the same as things work now
The change would cost some performance in 'single domain' applications, but should give significant gain in 'multi domain' environment.
The text was updated successfully, but these errors were encountered:
Currently there is, at most, one event queue per main loop and every event is delivered to every handler waiting for this event class. In case when multiple streams would be handled in the same loop, objects related to one stream would receive events generated by all other streams. The can cope with that by checking
event.stream
, but this is not quite optimal.The idea:
Client
instance for a client sessionevent_domain
attribute. If it is notNone
events belonging to other domains would not be delivered to this object. Instead ofevent_domain
we could also haveevent_domains
list to allow a handler belong to many domainsThe change would cost some performance in 'single domain' applications, but should give significant gain in 'multi domain' environment.
The text was updated successfully, but these errors were encountered: