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
The current state of using channels for events is.. bad. The channels are not buffered and emptied once full, but rather a func called alwaysListenToChans is listening to all channels in a for loop. Which ofcourse causes loss of information.
Dispatching to channels should be conditional, as most won't use them. Such that for those whom utilize handlers only, should not be affected by the extra resource usage that Disgord would require to manage the event channels. Regardless of how little of an performance impact that is.
Channels will still use the fan out pattern, but will require a form of scheduler to empty the channels before they are full to avoid deadlocks. New information/events must also not be deleted when the channels are emptied.
The Disgord users must understand that the event channels should not be used as a queue and any incoming events must be handled instantly. If the user desires a queue for events they must implement their own solution and populate it using Disgord. Not using the events channels within Disgord as a queue, since information will be lost.
The text was updated successfully, but these errors were encountered:
The current state of using channels for events is.. bad. The channels are not buffered and emptied once full, but rather a func called
alwaysListenToChans
is listening to all channels in a for loop. Which ofcourse causes loss of information.disgord/event_dispatcher_gen.go
Lines 196 to 246 in 6a93e08
Dispatching to channels should be conditional, as most won't use them. Such that for those whom utilize handlers only, should not be affected by the extra resource usage that Disgord would require to manage the event channels. Regardless of how little of an performance impact that is.
Channels will still use the fan out pattern, but will require a form of scheduler to empty the channels before they are full to avoid deadlocks. New information/events must also not be deleted when the channels are emptied.
The Disgord users must understand that the event channels should not be used as a queue and any incoming events must be handled instantly. If the user desires a queue for events they must implement their own solution and populate it using Disgord. Not using the events channels within Disgord as a queue, since information will be lost.
The text was updated successfully, but these errors were encountered: