Re: gen_event with history buffer

Alexander Petrovsky <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAH57y_S6CKcvCyVXUFow8u_nhHUWxRFfUGt+Wvc91VU7ud0d-A@mail.gmail.com>
ср, 3 нояб. 2021 г. в 18:31, Roger Lipscombe <[email protected]>:
>
> On Wed, 3 Nov 2021 at 13:57, Max Lapshin <[email protected]> wrote:
> > As for me, I have almost no idea how to use gen_event in real life.
>
> I wrote a thing about that:
> https://blog.differentpla.net/blog/2014/11/07/erlang-sup-event/
>
> For the original question, I'd be tempted to implement history *as a
> handler*, added immediately after the gen_event starts, and then I'd
> have new handlers query it for what they'd missed.

lol, it was in my mind too, but in this case, the handlers have to
know about the handler with history and ask it directly. But seems
like it's not a problem...


-- 
Alexander Petrovsky
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.