From 00ffd295b75bbcdb80eae9e26022d818dcf2eb21 Mon Sep 17 00:00:00 2001 From: Carl Fredrik Samson Date: Wed, 26 Jan 2022 00:46:19 +0100 Subject: [PATCH] Added teaser for expanding code for green threads and changed run to main --- src/0_background_information.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/0_background_information.md b/src/0_background_information.md index be444bf..024025b 100644 --- a/src/0_background_information.md +++ b/src/0_background_information.md @@ -145,7 +145,7 @@ A green threads example could look something like this: > It's not in any way meant to showcase "best practice". Just so we're on > the same page. -_**Press the expand icon in the top right corner to show the example code.**_ +_**Press the expand icon in the top right corner to show the example code (you'll actually find a minimal implementation of green threads there)**_ ```rust, edition2021 # #![feature(naked_functions)] @@ -343,7 +343,7 @@ _**Press the expand icon in the top right corner to show the example code.**_ # ); # } # #[cfg(not(windows))] -pub fn run() { +pub fn main() { let mut runtime = Runtime::new(); runtime.init(); Runtime::spawn(|| {