Hi,
I have a strange problem with a Ruby-GTK application I’m writing. Before
starting the GUI, I call a web service using soap4r. The code in
question:
#---------------------------------------------------------------------
service_driver=SOAP::RPC::Driver.new(svc_addr,‘urn:RGUIAuthenticator’)
service_driver.add_method(‘authenticate’, ‘username’, ‘password’)
auth_token = service_driver.authenticate(uname, passwd)
service_driver = nil
create_gui() # Just creates a Gtk::Window with one button
Gtk.main
#---------------------------------------------------------------------
The symptoms: At the Gtk.main call the window appears but is not painted
for about 30 seconds, during which my CPU usage runs up to 97% or so.
The event attached to the unpainted button is still fired on a click so
the loop isn’t actually hung. Once the 30 seconds of high-cpu usage
ends, the window content is painted in.
A window created before the web service is fired works fine, and if I
comment out the actual service call line everything goes back to normal.
Can anyone suggest why this conflict might be happening and remedy it?
I’ve tried putting the web service call into its own thread to no avail.
–
Thanks,
Matt.