owickstrom / gi-gtk-declarative

Declarative GTK+ programming in Haskell
https://owickstrom.github.io/gi-gtk-declarative/
288 stars 34 forks source link

Fix another race condition in app-simple #84

Closed Dretch closed 4 years ago

Dretch commented 4 years ago

@guibou another concurrency issue :)

run failed to finish if an input pipe was still running when the application loop finished. My app had an input that looped forever, emitting an event every 5 seconds, and this prevented the app from exiting.

Now the input pipes are cancelled if they are still going when the application finishes.

Dretch commented 4 years ago

I have one remaining concurrency concern.

There may be a problem with the threads that run the IO actions from Transition state action values that get returned from the update function:

I'm not sure if this is really a problem (though I think it is), and I'm not sure what the fix should be. I don't think it should prevent this PR being merged, but I wonder if you have any thoughts @guibou

Dretch commented 4 years ago

Github won't allow me to merge this pull request because I created it :smile:

Only @cblp or @owickstrom have the power to merge it.

However, if they can't do so within a couple of weeks, @guibou perhaps you could recreate the PR yourself -- because then Github will allow me to merge the code ?

cblp commented 4 years ago

I'm sorry, I don't have enough expertise to review this.

guibou commented 4 years ago

@Dretch I recreated the PR. Feel free to approve it ;) For the record, I do approve your change, even if I do not have this power.

Dretch commented 4 years ago

Thanks @guibou :)