================ @@ -0,0 +1,11 @@ +%extend lldb::SBLock { +#ifdef SWIGPYTHON + %pythoncode %{ + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.Unlock() ---------------- JDevlieghere wrote:
What I can make work is this: ``` lock = target.AcquireLock(); [...] lock.Unlock() with lock: # we are correctly locked here with lock: # we are correctly locked here ``` https://github.com/llvm/llvm-project/pull/131404 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits