A slightly less hellish way of building apps with seems workable with the new trio-gtk! No managing threads directly at all and plain old async/await syntax for programs that can walk and talk at the same time

stupid questions 

@decentral1se so it does some magic because the Gtks callbacks don't play nice with trio itself?

When do you want to use this? Are the buttons/etc otherwise nonresponsive while calculating something in the background?

stupid questions 

@jasper there are no stupid questions :)

Gtk has its own event loop so you cant use the Trio API directly, you need to run this "guest loop".

You'd want to use this if you have some background things happening in your GUI app. Say, when you drag & drop a file and want to do something with it but dont want to freeze the screen.

Gtks documentation says that you should just basically use threads for this stuff: but they are really hard to manage...

Sign in to participate in the conversation – a Fediverse instance for & by the Chaos community