Re: next round: glib thread safety proposal
- From: Jeff Garzik <jgarzik pobox com>
- To: wilhelmi ira uka de (Sebastian Wilhelmi)
- Cc: gtk-devel-list redhat com
- Subject: Re: next round: glib thread safety proposal
- Date: Tue, 1 Dec 1998 11:07:53 -0500 (EST)
Sebastian Wilhelmi wrote:
> I have a function, that uses a per thread memeory for certain objects in a
> list.
>
> g_thread_specific list;
>
> do_it( gpointer object )
> {
> GList *the_list = g_thread_specific_get(list);
> g_list_prepend(the_list, object);
> }
>
> How can the thread know about its list other than that? (Without the list
> being an agrument, that is)
I guess I never design programs like that. :)
I think we will have to agree to disagree. Thread-specific data just
seems like a hack to me. It implies that a thread calls functions
which don't know about thread-specific data inherently (through
args or some other means) -- but which in turn need to know about
thread-specific data. Maybe that's applicable in third-party libs or
something.
But if people will use it, put it in there...
Jeff
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]