• Luboš Luňák's avatar
    make CharClass also mutex-protect calls to its dependent class · a2045f94
    Luboš Luňák yazdı
    When calc_tests runs test_tdf53482_Range_contains_column_headings_file()
    with Calc's threading enabled, it ends up calling ScInterpreter::ScProper()
    from threads, which calls to CharClass. And while CharClass tries to be
    thread-safe (guessing from the mutex usage), it forwards calls to i18npool's
    CharacterClassificationImpl and cclass_Unicode, both of which aren't
    thread-safe. Which makes thread safety of CharClass itself pointless.
    Since CharClass already acquires the mutex anyway because of getMyLocale(),
    just extend the duration for the entire call, which hopefully shouldn't
    make that much of a difference.
    Change-Id: I544b34d7e58c4a901f3b6e3a3ff52156b9e320a8
    Reviewed-on: https://gerrit.libreoffice.org/54999Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
    Tested-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
charclass.cxx 11.5 KB