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;
fn main() {
unsafe {
Allocator::initialize();
Allocator::disable_gc();
}
unsafe { Allocator::initialize() }
Allocator::disable_gc();
let handle = Coroutine::spawn(move |_, _| {
let bottom: u8 = 0;