================
@@ -374,6 +374,12 @@ def wait_for_event(self, filter=None, timeout=None):
)
return None
+ def wait_for_process_and_initialized(self, timeout=None):
----------------
dmpots wrote:
You are taking `timeout` as a parameter here, but not passing it down to
`wait_for_event`.
I wonder if it would be useful to have a more general function to wait for any
set of events. Something like
```
# Wait for the set of events in `events`.
# Return the events not hit for before the timeout expired
def wait_for_events(self, events, timeout=None):
events = events[:] # Should we make a copy to not modify the input?
while events:
event = self.wait_for_event(filter=events, timeout=timeout)
events.remove(event["event"])
return events
```
Then we can call it like
```
self.wait_for_events(["process", "initialized"])
```
What do you think?
https://github.com/llvm/llvm-project/pull/137278
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits