Patrick Totzke wrote on 2011-07-05 12:22: > hmm, soory for the repost, I'm having trouble with the list not > accepting my posts again :/
Sorry to hear that. What did you have to do for your mail to go through? > Hi, > I'm having a similar problem, I want to call an external binary > asyncronously and once this is finished, I want to update my urwid > screen accordingly. > I just wanted to check: How about using urwids signals for this? Can I > emit some > selfmade signal in the child thread and then the parent responds with > a callback > that updates the screen? Or would theat signal be cought by a copy of > the mainloop that sits inside the thread? The latter. Urwid is thread-oblivious so you have to get the main thread to do the updating if you want your code to be reliable. I've just pushed up a change that makes that a little easier: http://excess.org/urwid/changeset/548%3Abec519870b07 watch_pipe() creates a pipe that when written to will call a function running in the thread running the main loop. Ian _______________________________________________ Urwid mailing list [email protected] http://lists.excess.org/mailman/listinfo/urwid
