alertmanager/provider/mem
Sergiusz Urbaniak f9896e0162
provider/mem: cleanup closed listener in GC
... rather than in the Subscribe method. Currently the cleanup for a
given Alert subscription is done in a blocking goroutine, started in
the Subscribe method.

This simplifies it by moving the cleanup to the GC.

Additionally it simplifies the subscribe method by setting up the
buffered channel big enough to fill it up with all pending alerts
preventing the necessity to start a goroutine in Subscribe at all.

Signed-off-by: Sergiusz Urbaniak <sergiusz.urbaniak@gmail.com>
2018-08-13 09:35:11 +02:00
..
mem.go provider/mem: cleanup closed listener in GC 2018-08-13 09:35:11 +02:00
mem_test.go provider/mem: Add `Put` `Subscribe` starvation test (#1503) 2018-08-06 16:00:17 +02:00