Le vendredi 29 janvier 2010 à 23:54 +0100, Aiden Nibali a écrit :
> Hello everyone,
> I am aware that there are many people who have asked questions relating
> to multi-threaded Gtk applications. However, after much trawling through
> the Internet I still can't work out why the following simple code will
> not produce any output:
> require 'gtk2'
> Thread.new do
> sleep 1 # Look busy
> exit # Finished, exit
> # Main loop
> loop do
> # Process all currently pending events
> Gtk.main_iteration while Gtk.events_pending?
> print '.'
It produces plenty of output here (fills my screen with dots immediatly)