1
0
Fork 0

Force GC when each event is at the end of its path

This commit is contained in:
Michał Rudowicz 2024-03-11 23:41:42 +01:00
parent 050dcbe72b
commit c5efc28c82
1 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"log"
"net/http"
"os"
"runtime"
"sync"
"git.sr.ht/~michalr/go-satel"
@ -25,6 +26,7 @@ type Sleeper interface {
func Consume(events <-chan GenericMessage) {
go func() {
for range events {
runtime.GC()
}
}()
}