Skip to content

Commit 458707c

Browse files
committed
Add some basic code to the summary
1 parent 41b9d7d commit 458707c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lldb/bindings/interface/SBProgressDocstrings.i

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,20 @@ is provided. This detail will also continue to be broadcasted on any subsequent
2222
specify a new detail. Some implementations differ on throttling updates and this behavior differs primarily
2323
if the progress is deterministic or non-deterministic. For DAP, non-deterministic update messages have a higher
2424
throttling rate than deterministic ones.
25-
") lldb::SBProgress;
25+
26+
Below are examples in Python for deterministic and non-deterministic progresses.
27+
28+
deterministic_progress = lldb.SBProgress('Deterministic Progress', 'Detail', 3, lldb.SBDebugger)
29+
for i in range(3):
30+
deterministic_progress.Increment(1, f'Update {i}')
31+
32+
non_deterministic_progress = lldb.SBProgress('Non deterministic progress, 'Detail', lldb.SBDebugger)
33+
for i in range(10):
34+
non_deterministic_progress.Increment(1)
35+
36+
# Explicitly send a progressEnd from Python.
37+
non_deterministic_progress.Finalize()
38+
") lldb::SBProgress;
2639

2740
%feature("docstring",
2841
"Finalize the SBProgress, which will cause a progress end event to be emitted. This

0 commit comments

Comments
 (0)