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
{{ message }}
This repository has been archived by the owner on May 23, 2020. It is now read-only.
This issue is more to remind myself of my own thoughts...
I've been thinking about the possibility of a firehose listener, i.e. one that gets every event. The advantage of it would be in cases where you need to listen to a whole bunch of events at once (for example RxLifecycle would put it to good use).
I think it can be wrapped into the existing Event<T> architecture if we add some sort of Firehose<Type, Object>. Then you'd register Event<Firehose<Type, Object>>, which would allow you to filter on Type and then use the provided Object. We'll necessarily lose some type safety on the firehose (since it has to emit any type of Object) but that will be the price you pay for it.
An alternative would be to just have Event<Type> and say that the firehose listener doesn't actually pass objects. This might be preferable since then we can avoid unnecessary object creation (i.e. on events that no one actually cares about and are filtering out in the firehose).
The text was updated successfully, but these errors were encountered:
This issue is more to remind myself of my own thoughts...
I've been thinking about the possibility of a firehose listener, i.e. one that gets every event. The advantage of it would be in cases where you need to listen to a whole bunch of events at once (for example RxLifecycle would put it to good use).
I think it can be wrapped into the existing
Event<T>
architecture if we add some sort ofFirehose<Type, Object>
. Then you'd registerEvent<Firehose<Type, Object>>
, which would allow you to filter onType
and then use the providedObject
. We'll necessarily lose some type safety on the firehose (since it has to emit any type ofObject
) but that will be the price you pay for it.An alternative would be to just have
Event<Type>
and say that the firehose listener doesn't actually pass objects. This might be preferable since then we can avoid unnecessary object creation (i.e. on events that no one actually cares about and are filtering out in the firehose).The text was updated successfully, but these errors were encountered: