Hi [email protected],

I opened a PR to add a RAII wrapper for TSMutexLock/TSMutexUnLock
called TSMutexLockGuard:

https://github.com/apache/trafficserver/pull/13188

The idea is to support scoped locking for plugin code, making things a
little
safer and clearer by unlocking automatically when the guard leaves scope.
The PR also converts a few plugin call sites where the mutex is naturally
held
until a return path.

Does this seem reasonable? Any concerns about this?

Thanks,
Brian Neradt

-- 
"Come to Me, all who are weary and heavy-laden, and I will
give you rest. Take My yoke upon you and learn from Me, for
I am gentle and humble in heart, and you will find rest for
your souls. For My yoke is easy and My burden is light."

    ~ Matthew 11:28-30

Reply via email to