Skip to content

Commit 0aff4c5

Browse files
committed
letsplay_runner_core: Make it a bit more clear games run in their own OS thread
Techinically it's an implementation detail, but it's pretty obvious based on logging, since the user can see other thread names (including the one used for the game). Might as well spell it out.
1 parent d6fa3d6 commit 0aff4c5

File tree

1 file changed

+5
-2
lines changed
  • crates/letsplay_runner_core/src/client

1 file changed

+5
-2
lines changed

crates/letsplay_runner_core/src/client/game.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ use super::GraphicsContexts;
44
use std::time::Instant;
55

66
/// A game that should be run by the runner core.
7-
/// A runner implementation implements this trait.
7+
///
8+
/// # Implementation notes
9+
/// `letsplay_runner_core` spawns off another OS thread to run implementations of this trait on.
10+
/// Note that games only run on that thread, nothing else.
811
pub trait Game {
912
/// Do any initalization tasks. Graphics contexts are provided
1013
fn init(&mut self, graphics_contexts: &GraphicsContexts, encoder_control: &Control);
@@ -20,7 +23,7 @@ pub trait Game {
2023

2124
// We'll need input + video frame stuff too
2225

23-
/// Runs a single frame of the game. Should not sleep, [Game::wait_for_next_frame]
26+
/// Runs a single frame of the game. Should not sleep, since [Game::wait_for_next_frame]
2427
/// will sleep until the next frame (if required).
2528
fn run_frame(&mut self);
2629

0 commit comments

Comments
 (0)