diff --git a/pixelgl/thread.go b/pixelgl/thread.go
index 818e95b9adfe18fa7473b2fe6a7b7dd33ddd24fd..d250b50ce258906b2490ce06c1a8b0855bec5094 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
 }