mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
uidriver/glfw: Ensure that canceling happens after all the queued tasks are done
This commit is contained in:
parent
deb3d4a0c3
commit
1ed2b09ba0
@ -606,7 +606,13 @@ func (u *UserInterface) Run(uicontext driver.UIContext) error {
|
||||
|
||||
ch := make(chan error, 1)
|
||||
go func() {
|
||||
defer cancel()
|
||||
defer func() {
|
||||
_ = u.t.Call(func() error {
|
||||
cancel()
|
||||
return nil
|
||||
})
|
||||
}()
|
||||
|
||||
defer close(ch)
|
||||
if err := u.run(); err != nil {
|
||||
ch <- err
|
||||
|
Loading…
Reference in New Issue
Block a user