MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / spawn

Function spawn

euralios_std/src/thread.rs:28–34  ·  view source on GitHub ↗

Spawn a new thread with closure The spawned thread may outlive the caller, so all variables captured must be moved or have static lifetime. thread::spawn(move || { // Code which captures from environment });

(f: F)

Source from the content-addressed store, hash-verified

26/// });
27///
28pub fn spawn<F>(f: F) -> Result<(), SyscallError>
29where
30 F: FnOnce() -> (),
31 F: Send + 'static,
32{
33 launch(Box::new(f))
34}
35
36/// Launch a thread by calling the low-level syscalls
37///

Callers 3

openFunction · 0.85
mainFunction · 0.85
open_pathFunction · 0.85

Calls 1

launchFunction · 0.85

Tested by

no test coverage detected