Skip to content

Commit d10a591

Browse files
committed
Rename run_background to run_background_task for clarity
1 parent ec43e45 commit d10a591

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

crates/codegen/src/rust.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ impl __sdk::InModule for RemoteTables {{
13751375
///
13761376
/// - [`DbConnection::frame_tick`].
13771377
/// - [`DbConnection::run_threaded`].
1378-
/// - [`DbConnection::run_background`].
1378+
/// - [`DbConnection::run_background_task`].
13791379
/// - [`DbConnection::run_async`].
13801380
/// - [`DbConnection::advance_one_message`].
13811381
/// - [`DbConnection::advance_one_message_blocking`].
@@ -1518,8 +1518,8 @@ impl DbConnection {{
15181518
15191519
/// Spawn a background task which processes WebSocket messages as they are received.
15201520
#[cfg(target_arch = \"wasm32\")]
1521-
pub fn run_background(&self) {{
1522-
self.imp.run_background()
1521+
pub fn run_background_task(&self) {{
1522+
self.imp.run_background_task()
15231523
}}
15241524
15251525
/// Run an `async` loop which processes WebSocket messages when polled.

crates/codegen/tests/snapshots/codegen__codegen_rust.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,7 @@ impl __sdk::InModule for RemoteTables {
18061806
///
18071807
/// - [`DbConnection::frame_tick`].
18081808
/// - [`DbConnection::run_threaded`].
1809-
/// - [`DbConnection::run_background`].
1809+
/// - [`DbConnection::run_background_task`].
18101810
/// - [`DbConnection::run_async`].
18111811
/// - [`DbConnection::advance_one_message`].
18121812
/// - [`DbConnection::advance_one_message_blocking`].
@@ -1949,8 +1949,8 @@ impl DbConnection {
19491949

19501950
/// Spawn a background task which processes WebSocket messages as they are received.
19511951
#[cfg(target_arch = "wasm32")]
1952-
pub fn run_background(&self) {
1953-
self.imp.run_background()
1952+
pub fn run_background_task(&self) {
1953+
self.imp.run_background_task()
19541954
}
19551955

19561956
/// Run an `async` loop which processes WebSocket messages when polled.

sdks/rust/src/db_connection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ impl<M: SpacetimeModule> DbContextImpl<M> {
657657
///
658658
/// Called by the autogenerated `DbConnection` method of the same name.
659659
#[cfg(feature = "web")]
660-
pub fn run_background(&self) {
660+
pub fn run_background_task(&self) {
661661
let this = self.clone();
662662
wasm_bindgen_futures::spawn_local(async move {
663663
loop {
@@ -952,7 +952,7 @@ You must explicitly advance the connection by calling any one of:
952952
953953
- `DbConnection::frame_tick`.
954954
- `DbConnection::run_threaded`.
955-
- `DbConnection::run_background`.
955+
- `DbConnection::run_background_task`.
956956
- `DbConnection::run_async`.
957957
- `DbConnection::advance_one_message`.
958958
- `DbConnection::advance_one_message_blocking`.

0 commit comments

Comments
 (0)