mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
thread: started should be reset after Loop
This commit is contained in:
parent
85dcafe176
commit
9c283d45b4
@ -38,6 +38,8 @@ func New() *Thread {
|
||||
// Loop must be called on the thread.
|
||||
func (t *Thread) Loop(ch <-chan error) error {
|
||||
atomic.StoreInt32(&t.started, 1)
|
||||
defer atomic.StoreInt32(&t.started, 0)
|
||||
|
||||
for {
|
||||
select {
|
||||
case f := <-t.funcs:
|
||||
|
Loading…
Reference in New Issue
Block a user