RE: [xml] side effects of thread-enabling libxml2



It could be something like xmlSet/GetPerThreadGlobalsEnabled();
And entries in global.c could read like

#undef    xmlGenericError
xmlGenericErrorFunc *
__xmlGenericError(void) {
    if (!perThreadGlobalsEnabled || IS_MAIN_THREAD)
    return (&xmlGenericError);
    else
    return (&xmlGetGlobalState()->xmlGenericError);
}

  Sounds too heavy. I would prefer something per-variable, though
I understand that from your point of view it would garantee the same
behaviour at minimal costs. I'm not strongly sided, if other users of
the thread features could voice their concern/preferences this would
help ...


You could see it that way: per-thread globals is a feature,
but not everyone wants/needs that feature, since in some case
it simplifies application programming, but in other cases
it complexifies it (like in the python bindings). 
So why not provide a way to activate or deactivate it?

-sbi




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