Make properties fully thread-safe
Jump to navigation
Jump to search
| Title: | Make properties fully thread-safe [[File: |thumbnail|]] |
| Potential mentors: | Julian Smith |
| Intro: | (short intro) |
| Interested Parties: | (feel free to add yourself) |
| Status: |
Post-hackathon write-up (2021-11-7) Summary:
Next steps:
|
| Summary: | Change property system to return std::string by value instead of char*.
|
| Background: | The properties system was made mostly thread-safe in early 2021 using read/write locks (see SimGear commit f1dd7901cbb9ed5fb342ae1ec2ac982b915fb9f0). However some methods such as SGPropertyNode::getStringValue() still return a char* pointer into the property's internal data, which is not thread-safe.
|
| Details: | Returning std::string by value might affect performance, so we'll need to profile before/after. It's likely that we can fix performance problems by modifying calling code, e.g. caching string values outside loops etc.
|
| Ideas: | |
| Required skills: | C++ |
| Learning Opportunities: | |
| Notes: |
| References
|