Yes, I was indeed thinking of named pipes. I haven't done that much
thread programming so far.
So what I would want to do here is
1) define a callback that will update my widgets
2) call mainloop.watch_pipe with that callback, storing the
pipe-handle somewhere,
3) fork/start a thread that can access the pipe-handle, do something
4) write to the pipe from inside the thread
am i right?
thanks!
/p

On 5 July 2011 19:33, Ian Ward <[email protected]> wrote:
> Patrick Totzke wrote on 2011-07-05 14:15:
>>> 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.
>>
>> That sounds sensible, although it feels a bit strange that one has to
>> go via an "external pipe" for thread sync. But that's probably just me :)
>> thanks for your swift reply,
>
> Pipes aren't external.. are you thinking of named pipes?
>
> Pipes are one of the simplest ways to communicate between threads and
> processes, and they will work with whatever event loop you're using (the
> default one, twisted or glib)
>
> Ian
>
>
> _______________________________________________
> Urwid mailing list
> [email protected]
> http://lists.excess.org/mailman/listinfo/urwid
>

_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to