Albrecht Schlosser wrote:
> Greg Ercolano wrote:
>> Marcel's right -- since your data's coming in slowly during the popen,
>> you'd either have to use a thread.. or you might be able to avoid threads
>> by using Fl::add_fd() with popen() as shown here:
>>
>>      http://seriss.com/people/erco/fltk/#add_fd
>>
>> This is one of the few instances where add_fd() should work across platforms
>> correctly.
> 
> Are you sure? IMHO under Windows the only working "fd"s are sockets.

        Meh, yes you're right.. it /is/ only sockets that add_fd() supports.

        And to think I used to know this :/

        Guess I forgot which way around it was when I wrote that example too.

        Just checked; definitely the example reacts in a 'chunky' way,
        as if it wasn't getting cpu while the 'ping' is waiting.. so
        the example is "wrong" too.

        I'll revise the example with a comment indicating it *doesn't*
        work under Windows, only unix.

        And OP should go with Marcel's approach, using threads.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to