"thread vtables" (Was: Re: [cairo] Static caches and thread-safety)

MenTaLguY mental at rydia.net
Sat Nov 13 12:01:49 PST 2004


On Fri, 2004-11-12 at 11:20, Owen Taylor wrote:
>  - Are there cases where people want to use different threading
>    systems then the system default threading?
>    
>    This was a big concern when we first added threading to GLib,
>    so when you initialize GLib, you provide a VTable of thread
>    primitives (mutexes, condition variables, etc.) However, it
>    turned out the usage of non-system thread libraries was basically
>    a dying remnant, and in that light using the vtable was a bit
>    of a mistake, it prevents us from using all the capabilities
>    of more capable threading systems.

One other situation in which it's valuable is when an application uses a
"magic" library that wants to hook the platform's thread primitives to
work properly with multithreading.

The boehm collector, which Inkscape uses, is one such library.  At
present we're not using threads (so far it's not been worth the
trouble), but we may want to do so eventually in a limited fashion.

Glib (because of the vtable) shouldn't be a problem, but we'd also like
to use cairo eventually.  It'd be really awkward to have to choose
between cairo, libgc, and threading (well, pick two).

-mental
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20041113/d8a71070/attachment.pgp


More information about the cairo mailing list