[Gtk-sharp-list] (SOLVED): Application.Invoke and threads: strange behavior

Todd Berman tberman at off.net
Wed Oct 19 13:50:08 EDT 2005

On Wed, 2005-10-19 at 19:31 +0200, amartinez at atc.ugr.es wrote:
> Hi,
> >Now I have tried to use a little C program (attached) which uses printf
> >and sleep(1). The usage is 'foo 4' and prints 4 strings, one every second.
> >
> >The situation is just the same, I can't understand why the command ping
> >works fine and my foo program not. The standard out and the TextView are
> >refreshed at the end of the execution of foo.
> My bad. Only a 'fflush(stdout)' next to the 'printf' in the C code solves
> the problem.

That isnt actually solved dude. It happens to work due to the timing on
your machine, but could change between machines, or glibc
implementations, or mono versions, etc, etc.


More information about the Gtk-sharp-list mailing list