-
Notifications
You must be signed in to change notification settings - Fork 631
Open
Description
I used g.Update to append lines to a text box that scrolls - like a tail -f.
Periodically i remove lines from buffer so the size doesnt grow forever, however the fact that g.Update() creates a go routine leaks lots of memory over time. After a few 10k lines you end up with 10k go routines worth of descriptors in memory that will never be freed.
Editing the code and changing update to:
func (g *Gui) Update(f func(*Gui) error) {
g.userEvents <- userEvent{f: f}
}improves things for me drastically without impacting anything noticable. Can you perhaps tell me the reason why Update does this in a go routine? Might we add a SyncUpdate or similar that doesnt create a go routine?
Metadata
Metadata
Assignees
Labels
No labels