From 7986fea950c1e818e7da6b43b248647d47b01209 Mon Sep 17 00:00:00 2001 From: Andrey Lesnikov Date: Fri, 26 Dec 2014 01:23:43 +0300 Subject: [PATCH] 'spawn' -> 'std::thread::Thread::spawn' --- glue/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glue/src/lib.rs b/glue/src/lib.rs index fa134db69cfcd..a888a380dae58 100644 --- a/glue/src/lib.rs +++ b/glue/src/lib.rs @@ -10,6 +10,8 @@ extern crate libc; use std::sync::Mutex; +use std::thread::Thread; + #[doc(hidden)] pub mod ffi; @@ -79,7 +81,7 @@ pub fn android_main2(app: *mut (), main_function: F) app.userData = unsafe { std::mem::transmute(&context) }; // executing the main function in parallel - spawn(move|| { + let g = Thread::spawn(move|| { std::io::stdio::set_stdout(box std::io::LineBufferedWriter::new(ToLogWriter)); std::io::stdio::set_stderr(box std::io::LineBufferedWriter::new(ToLogWriter)); main_function()