================
@@ -71,10 +92,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 std::atomic<bool> &IsStopping() const { return m_stopping; };
----------------
Nerixyz wrote:

This can return the `bool` value - all uses call `.load` immediately.

https://github.com/llvm/llvm-project/pull/182302
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to