[Lldb-commits] [lldb] [lldb][progress][NFC] Add groundwork to keep track of progress reports (PR #81026)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 7 15:49:11 PST 2024


JDevlieghere wrote:

> A few questions I have:
> 
> * do we really want each progress to select if it should be coalesced as a `Progress` constructor arguments? Or do we want a global setting on how progress events should be delivered?

My understanding is that the constructor conveys whether something is an "aggregate" progress event or not and they're broadcast differently so that the listener can decide how they want to receive these "aggregate" events. 

> * The current code adds a way to increment and decrement refcounts of ongoing progress categories (titles), but doesn't do anything with them, what do we envision happening with these ref counts?

With the previous idea in mind, you need the refcount in case there are overlapping events:

```
eBroadcastBitProgress           [foo]
eBroadcastBitProgress              [foo]
eBroadcastBitProgressByCategory [foo   ]
---------------------------------------> (time)
```

So basically if you have two events `foo` that overlap as shown above, if you're listening for `eBroadcastBitProgress` you get two events. If you're listening for `eBroadcastBitProgressByCategory`. The refcount is used to make sure you don't broadcast an events for `eBroadcastBitProgressByCategory` when the first foo ends. 

https://github.com/llvm/llvm-project/pull/81026


More information about the lldb-commits mailing list