summaryrefslogtreecommitdiff
path: root/rust/src/background_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/background_task.rs')
-rw-r--r--rust/src/background_task.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/src/background_task.rs b/rust/src/background_task.rs
index 79aec683..1d902c3a 100644
--- a/rust/src/background_task.rs
+++ b/rust/src/background_task.rs
@@ -70,6 +70,9 @@ impl BackgroundTask {
Self { handle }
}
+ /// Begin the [`BackgroundTask`], you must manually finish the task by calling [`BackgroundTask::finish`].
+ ///
+ /// If you wish to automatically finish the task when leaving the scope, use [`BackgroundTask::enter`].
pub fn new(initial_text: &str, can_cancel: bool) -> Ref<Self> {
let text = initial_text.to_cstr();
let handle = unsafe { BNBeginBackgroundTask(text.as_ptr(), can_cancel) };