diff options
| author | Lang Hames <lhames@gmail.com> | 2025-07-03 17:03:39 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-03 17:03:39 +1000 |
| commit | 0bfa0bcd79f787db6194270bb838ae04ca46587e (patch) | |
| tree | 29d354c52338894199e02f5a1b9c660ad55f0a99 /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.cpp | |
| parent | 9234d077522ea3718e9486a28df49e7cfb4c336a (diff) | |
[ORC] Replace ThreadSafeContext::getContext with withContextDo. (#146819)
This removes ThreadSafeContext::Lock, ThreadSafeContext::getLock, and
ThreadSafeContext::getContext, and replaces them with a
ThreadSafeContext::withContextDo method (and const override).
The new method can be used to access an existing
ThreadSafeContext-wrapped LLVMContext in a safe way:
ThreadSafeContext TSCtx = ... ;
TSCtx.withContextDo([](LLVMContext *Ctx) {
// this closure has exclusive access to Ctx.
});
The new API enforces correct locking, whereas the old APIs relied on
manual locking (which almost no in-tree code preformed, relying instead
on incidental exclusive access to the ThreadSafeContext).
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.cpp')
0 files changed, 0 insertions, 0 deletions
