[Mono-list] XML-RPC Thread Falling Asleep

Jerome Haltom wasabi at larvalstage.net
Fri May 11 11:52:27 EDT 2007


You aren't manipulating the Gtk window from this other thread, are you?
The UI is not thread safe. You need to use callbacks on the main-loop to
manipulate it.

On Thu, 2007-05-10 at 21:37 -0400, Stephen Gerstacker wrote:
> I've written a mono application that spawns an XML-RPC server in a  
> thread and a GTK# form in the main thread.  The XML-RPC server will  
> manipulate the GTK form when it receives certain requests.   
> Everything runs fine for about a minute, but after that, the XML-RPC  
> server stops responding.
> 
> Anyone know where I should start looking or how to combat this  
> problem?  Below is the code that kicks off both threads.   
> XmlRpcServer is just an object.  MainWindow inherits from Gtk.Window.
> 
> public static void Main (string[] args)
> {
> 	Application.Init();
> 	MainWindow win = new MainWindow();
> 
> 	HttpServerChannel channel = new HttpServerChannel("xmlrpc", 5678,  
> new XmlRpcServerFormatterSinkProvider());
> 	ChannelServices.RegisterChannel(channel);
> 	XmlRpcServer xmlrpc_server = new XmlRpcServer(win);
> 	RemotingServices.Marshal(xmlrpc_server, "xmlrpc");
> 
> 	win.Show();
> 
> 	Application.Run();
> }
> 
> - Stephen
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list