WIP: Make cmsys::RegularExpression thread safe
cmsys::RegularExpression
used global variables shared by every instance.
This made it impossible to use it concurrently even with independent instances.
By moving the once shared variables into a class on the stack cmsys::RegularExpression
becomes reentrant. That means that separate instances of cmsys::RegularExpression
can be used concurrently in different threads.
Additionally there is a new cmsys::RegularExpressionMatch
class that can be passed to a
new two-argument cmsys::RegularExpression::find()
method.
The new method is thread safe when used with separate cmsys::RegularExpressionMatch
instances.
This allows to use the find()
method of a single cmsys::RegularExpression
instance concurrently on different strings
with independent cmsys::RegularExpressionMatch
results.