Refactor coroutines example

This commit is contained in:
Yota Toyama
2019-04-30 15:16:51 +00:00
parent 05ac86223a
commit 3847afbc60

View File

@@ -9,10 +9,8 @@ use std::alloc::{GlobalAlloc, Layout};
static GLOBAL_ALLOCATOR: Allocator = Allocator; static GLOBAL_ALLOCATOR: Allocator = Allocator;
fn main() { fn main() {
unsafe { unsafe { Allocator::initialize() }
Allocator::initialize();
Allocator::disable_gc(); Allocator::disable_gc();
}
let handle = Coroutine::spawn(move |_, _| { let handle = Coroutine::spawn(move |_, _| {
let bottom: u8 = 0; let bottom: u8 = 0;