summaryrefslogtreecommitdiffstats
path: root/third_party/rust/interrupt-support/src/shutdown.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/interrupt-support/src/shutdown.rs')
-rw-r--r--third_party/rust/interrupt-support/src/shutdown.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/third_party/rust/interrupt-support/src/shutdown.rs b/third_party/rust/interrupt-support/src/shutdown.rs
index 9c64df27e8..88a56029b8 100644
--- a/third_party/rust/interrupt-support/src/shutdown.rs
+++ b/third_party/rust/interrupt-support/src/shutdown.rs
@@ -12,13 +12,14 @@ License, v. 2.0. If a copy of the MPL was not distributed with this
///
/// Here's how add shutdown support to a component:
///
-/// - Use `SqlInterruptScope::new_with_shutdown_check()` to create a new
-/// `SqlInterruptScope`
/// - Database connections need to be wrapped in a type that:
/// - Implements `AsRef<SqlInterruptHandle>`.
/// - Gets wrapped in an `Arc<>`. This is needed so the shutdown code can get a weak reference to
/// the instance.
/// - Calls `register_interrupt()` on creation
+/// - Use `SqlInterruptScope::begin_interrupt_scope()` before each operation.
+/// This will return an error if shutdown mode is in effect.
+/// The interrupt scope should be periodically checked to handle the operation being interrupted/shutdown after it started.
///
/// See `PlacesDb::begin_interrupt_scope()` and `PlacesApi::new_connection()` for an example of
/// how this works.