mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-12 22:17: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.
|
// Loop must be called on the thread.
|
||||||
func (t *Thread) Loop(ch <-chan error) error {
|
func (t *Thread) Loop(ch <-chan error) error {
|
||||||
atomic.StoreInt32(&t.started, 1)
|
atomic.StoreInt32(&t.started, 1)
|
||||||
|
defer atomic.StoreInt32(&t.started, 0)
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case f := <-t.funcs:
|
case f := <-t.funcs:
|
||||||
|
Loading…
Reference in New Issue
Block a user