forked from GitHub/bdwgc-rust
Refactor coroutines example
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user