Re: [Fwd: Client *and* server?]



Katherine Goude wrote:
> > On Wed, 2002-06-26 at 08:57, Katherine Goude wrote:
> > > Then why do I get a GLib-critical error when I try to make my program do
> > > just that??
> >
> >         What glib critical error ? can you post the error message, and the
> > backtrace.
> 
> I've updated to glib-2.0.3 which has given me a much clearer error message, which
> is "Glib-WARNING **: g_main_context_prepare(): main loop already active in another
> thread"
> 
> > > It works fine doing the client part alone and fine doing just the server
> > > part but if I try to let it do both (being a server in one thread of the
> > > program and a client in another thread) then it crashes.
> >
> >         Extremely odd - with a backtrace we can help you.
> 
> Can't do a backtrace - running on an embedded system with no gdb.
> 
> > > Any ideas where I'm going wrong? Will using ORBit-MT (the multi-threaded
> > > version of ORBit) help?
> ...
> 
> So is that a "no"? I'm confused about the difference between a multithreaded ORB
> and using an ORB in a multithreaded environment. Do you need the former if you're
> doing the latter?

First off, you should not be using orbit from more than one thread.
It's a single-threaded system.
Orbit's multithread support is not ready yet.  (Or so I gather.)

Second, there's no particular reason to have one thread for
your client and a different thread for your server; can't you
run both in the same thread?

Third, gdb just now acquired the ability to do remote debugging of
multithreaded programs.  You'll need to build it from CVS, though,
as even gdb 5.2 doesn't support it; it's very new.
- Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]