Re: Proposal: giop-thread-invocation-stack
- From: Michael Meeks <michael ximian com>
- To: Frank Rehberger <Frank Rehberger web de>
- Cc: Mark McLoughlin <mark skynet ie>, orbit <orbit-list gnome org>
- Subject: Re: Proposal: giop-thread-invocation-stack
- Date: Mon, 17 Nov 2003 12:06:56 +0000
Hi Frank,
On Sat, 2003-11-15 at 10:58, Frank Rehberger wrote:
> I would like to commit this stuff (please look at attached
> /tmp/giop-invocation-stack.diff.gz)
Ok; I have a few things:
Can you split this to two lines:
if (mutex) g_mutex_free (mutex);
Cosmetic but how we should do things I think.
// FIXME, Frank, what about free-ing giop_main_thread and pool
// of giop_threads?.
An interesting FIXME :-) but using '//' in C code is a gcc extension
and will break Forte / Ansi compilers.
For the 'giop_thread_invocation_stack_first_equal' thing it's normal to
have a typedef for the iterator function.
The other thing is - it's good to pass the *tdata to these functions to
save a slow g_thread_private lookup, but since the stuff is now
per-thread, no-one else can be accessing that data at a given time - so
we don't in fact need the locking :-) to signify that we should add a _T
suffix to the method names I think.
Finally - I think we should use a static GIOPThread *main_thread; for
the case where we are not in a threaded-mode, simply because I think
this could simplify a chunk of logic in other places where we have
similar special cases that currently add code & complexity.
This would then remove the need for:
GSList *stack = tdata ? tdata->current_invocations :
giop_current_invocations;
and this sort of special case comment:
+ /* multi threaded setup only */
Anyhow - it's _really_ great to have you working on this, sorry if
that's a rather daunting set of changes, but I think we have to work
hard to try and keep this as simple as we possibly can, otherwise it's
just going to get unmanageable / out of control :-)
Thanks muchly,
Michael.
--
michael@ximian.com <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]