Cut comments back to the non-obvious

Rationale that explains a decision rather than the code below it belongs in
the sandbox README or the PR, not in a header paragraph on every file.
This commit is contained in:
Gregory Schier
2026-08-17 22:10:12 -07:00
parent 8d10a5d879
commit 45adc2d023
23 changed files with 141 additions and 529 deletions
+4 -8
View File
@@ -8,14 +8,10 @@ use std::future::Future;
const MAX_DEPTH: usize = 50;
/// `Send`, except where nothing can be.
///
/// Rendering a template function is a host call, and on a host with one thread
/// it is a call into JavaScript: the future holds a `JsFuture` and the callback
/// holds the `Rc` connection pool, neither of which is `Send` nor can be made
/// so. Every other host spawns rendering onto a thread pool and needs the bound.
/// So the bound belongs to the targets that can keep it, rather than to the
/// trait every host must implement.
/// `Send`, except on wasm32, where a template function is a call into
/// JavaScript: the future holds a `JsFuture` and the callback an `Rc` pool,
/// neither of which can be `Send`. Every other host spawns rendering onto a
/// thread pool and needs the bound.
#[cfg(not(target_arch = "wasm32"))]
pub trait MaybeSend: Send {}
#[cfg(not(target_arch = "wasm32"))]