Changing threading semantics from init early to init before second thread

Havoc Pennington hp at redhat.com
Mon Aug 28 08:27:25 PDT 2006


Alexander Larsson wrote:
> Its pretty ok:
> 

Seems sane. So the thread init would be like this, right:

  on first mutex creation
    if threads explicitly disabled, don't init
    else if threads already init'd, don't change anything
    else if linux/glibc and linking to pthread, init threads
    else if linux/glibc and not linking to pthread,
            act as if threads had been explicitly disabled
    else if not linux/glibc, init threads

Hmm, though what happens if a dlopen()'d module using dbus links to 
pthread and the app does not? Are we back to the problem we were trying 
to fix about the app needing to init threads on behalf of the module?

Havoc



More information about the dbus mailing list