diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-03-10 17:23:18 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-12 09:16:42 +0100 |
commit | 6b821a3dc80b7203a8c9def42294924e5d718068 (patch) | |
tree | 043b68b970582540630f01cb726f3694f0d88746 /src/corelib/tools/qset.h | |
parent | 14b2d4cd3894e145c222a7cf63b8293567107402 (diff) |
QRegularExpression: refactor the handling of the study data
Consider the following situation:
- threads A and B have shallow copies of the same QRegularExpression
- threads A and B both call match() on a string
- thread A calls optimizePattern(), which doesn't optimize
- thread B calls optimizePattern(), which does optimize, and sets
studyData
- thread A uses studyData (set by B)
A needs to properly acquire the memory pointed by studyData
(which, in turn, needs to be released by B). This commit implements that.
(Before, we used to return a copy of the current studyData from
optimizePattern(), so A didn't see that B optimized the pattern
and set studyData).
Change-Id: I9e4741a3d3229905c247491a07099519815680bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qset.h')
0 files changed, 0 insertions, 0 deletions