================
@@ -31,6 +36,127 @@ static DWORD
ToTimeout(std::optional<MainLoopWindows::TimePoint> point) {
return ceil<milliseconds>(dur).count();
}
+class PipeFdInfo : public MainLoopWindows::FdInfo {
+public:
+ explicit PipeFdInfo(HANDLE handle, MainLoopBase::Callback callback)
+ : FdInfo((intptr_t)CreateEventW(NULL, /*bManualReset=*/FALSE,
+ /*bInitialState=*/FALSE, NULL),
+ callback),
+ handle(handle), ready(CreateEventW(NULL, /*bManualReset=*/FALSE,
+ /*bInitialState=*/FALSE, NULL)) {
+ assert(event && ready);
+ }
+
+ ~PipeFdInfo() override {
+ if (monitor_thread.joinable()) {
----------------
labath wrote:
Can we drop the read thread? Did [this
implementation](https://github.com/llvm/llvm-project/commit/6675e03763c7d64e3335f1582c0fd7bc639be7d7)
not work? I believe it should be possible to plug the event from the read
operation into the WaitForMultipleObjects call.
https://github.com/llvm/llvm-project/pull/145621
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits