Add runtime.Gosched to update loader properly
This commit is contained in:
parent
807721773b
commit
928a7dd3e8
3
main.go
3
main.go
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/divan/graphx/formats"
|
||||
|
@ -39,7 +40,7 @@ func main() {
|
|||
for i := 0; i < steps; i++ {
|
||||
l.UpdatePositions()
|
||||
page.loader.Inc()
|
||||
vecty.Rerender(page.loader)
|
||||
runtime.Gosched()
|
||||
}
|
||||
page.loaded = true
|
||||
vecty.Rerender(page)
|
||||
|
|
Loading…
Reference in New Issue