diff --git a/pixelgl/thread.go b/pixelgl/thread.go index 818e95b..d250b50 100644 --- a/pixelgl/thread.go +++ b/pixelgl/thread.go @@ -65,10 +65,10 @@ func DoNoBlock(f func()) { // // All OpenGL calls must be done in the dedicated thread. func Do(f func()) { - done := make(chan bool) + done := make(chan struct{}) callQueue <- func() { f() - done <- true + close(done) } <-done }