Bug 148852 - Convert CCharacterData to use std::mutex
Summary: Convert CCharacterData to use std::mutex
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Hannah Meeks
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2022-04-29 13:22 UTC by Noel Grandin
Modified: 2022-09-23 06:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noel Grandin 2022-04-29 13:22:20 UTC
Description:
CCharacterData currently used osl::Mutex (which is a recursive mutex) but looks like
it could use std::mutex (which is not recurisve, and hence more efficient).

This requires tracing the call paths a little to make sure that after taking the mutex we don't try and take it again

Steps to Reproduce:
  This requires tracing the call paths a little to make sure that after taking the mutex we don't try and take it again

Actual Results:
x

Expected Results:
x


Reproducible: Always


User Profile Reset: No



Additional Info:
x
Comment 1 Julien Nabet 2022-04-29 17:50:37 UTC
Hannah: let's put this one to ASSIGNED since you assigned yourself :-)
Comment 2 Hannah Meeks 2022-05-12 19:04:15 UTC Comment hidden (obsolete)
Comment 3 Hannah Meeks 2022-05-12 19:04:31 UTC
Bit stuck on this:

CNode::appendChild calls setOwnerDocument and deadlocks, what do you advise?
Comment 4 Hannah Meeks 2022-05-12 19:05:05 UTC Comment hidden (obsolete)
Comment 5 Noel Grandin 2022-09-23 06:05:26 UTC
This turned out to be a bad idea, too many calls back into the class necessitating  recursive mutex