-
I have a producer_consumer that sometimes needs to stop receive events from producer and wait some time to start receiving them again. So I use :manual behavior in handle_subscribe when :producer subs…
-
The goal is to migrate Logger handlers away from GenEvent. We can either use Erlang's `gen_event` or have a custom implementation on top of GenServer. We are not going to use GenStage because this is …
-
Hi,
I am trying to implement a dynamic pipeline using genstage. I have a pipeline setup where "on demand" it gets constructed and run thru it's multiple stages but then I'd like to collapse the w…
-
GenEvent really doesn't do much for us here, the Hooks operate more as GenServers. There's a fair bit of bloat to Hook setup because of this, so we should just fallback to using GenServer. In future, …
-
Hello, and congrats on new counter-based and session-based windows 👍 .
When working with fixed windows, I observed that each state waits for the next event to arrive before emitting it events to the …
-
The goal is to return those options as part of the `:ok` tuple. Instead of:
``` elixir
def init(arg) do
children = [
...
]
supervise(children, strategy: :one_for_one)
end
```
we should ret…
-
The docs for `GenStage.ask/3` say:
> This is an asynchronous request typically used by consumers in `:manual` demand mode.
But according to `GenStage.demand/2`, the only valid demand modes are `:for…
-
I've been playing around with `gen_stage` today to prototype some stuff and I'm having trouble with an example that feels like it should be really simple. I'm trying to build a really simple worker p…
-
I accidentally passed a tuple to `GenStage.sync_subscribe` (instead of a pid), and got this very confusing error:
``` elixir
** (FunctionClauseError) no function clause matching in GenServer.whereis/…
-
Instead of having a single logger process that may be a processing bottleneck, we could allow a pool of loggers to be started and dispatch to it based on the caller PID. When a handler is added, it sh…