================ @@ -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:
Can you think of a way to make this work in Python, without giving up on the RAII property on the C++ side? I my opinion the `SBLock` is a lot more important in C++ than it is in Python (where the GIL means you don't truly have multithreading anyway, though I know in the future there might be a mode without the GIL). 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