================
@@ -71,10 +88,33 @@ class PseudoConsole {
/// then drain all output before launching the actual debuggee.
llvm::Error DrainInitSequences();
+ /// Returns a reference to the mutex used to synchronize access to the
+ /// ConPTY state.
+ std::mutex &GetMutex() { return m_mutex; };
+
+ /// Returns a reference to the condition variable used to signal state
changes
+ /// to threads waiting on the ConPTY (e.g. waiting for output or shutdown).
+ std::condition_variable &GetCV() { return m_cv; };
+
+ /// Returns whether the ConPTY is in the process of shutting down.
+ ///
+ /// \return
+ /// A reference to the atomic bool that is set to true when the ConPTY
+ /// is stopping. Callers should check this in their read/write loops to
+ /// exit gracefully.
+ const bool &IsStopping() const { return m_stopping; };
----------------
Nerixyz wrote:
```suggestion
bool IsStopping() const { return m_stopping.load(); };
```
There's technically an `operator T` for `std::atomic` but an explicit `load`
makes it more clear imo.
https://github.com/llvm/llvm-project/pull/182302
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits