Hi,

On Tue, 25 Apr 2006 18:03:35 +0900
"Talha Oktay" <toktay / gmail.com> wrote:

> Hi,
> 
> Thank you all for all yours posts. I really appreciate. I was wrong about
> geometry managers. I guess the form geometry manager is not in standard Tk
> distribution.
> 
> However, I have stopped my parallel development on Tk, and I will try
> information you provided some other time for learning purposes. I continue
> my development using Gtk binding. So far, I am quite pleased with the
> documentation, tutorials and available GTK tools existing. However my
> question is still pending about integration to Gtk main loop.
> I had following observations in windows platform about using threads.
> In windows platform, threads are not being scheduled against gtk main loop(
> this is also valid for tk main loop as well). When I open a socket and bind
> it in the thread, it sits there. Gtk main loop does not leave control to the
> thread. As fork is not available in windows platforms I have downloaded the
> win32-utils process module and tying to use that but could not be successful
> so far.  Mostly due to my lack of understanding the parallel programming
> using processes I guess. I am much accustomed to using threads.
> 
> Again thank you all.

How about Gtk.idle_add ?

require 'gtk2'

Gtk.init
w = Gtk::Window.new("Test")
w.signal_connect("destroy"){Gtk.main_quit}
w.show_all
Gtk.idle_add do
  p Time.now
  true
end
Gtk.main

 

-- 
.:% Masao Mutoh<mutoh / highway.ne.jp>