- Notifications
You must be signed in to change notification settings - Fork42
Coroutine Library in Rust
License
Apache-2.0, MIT licenses found
Licenses found
Apache-2.0
LICENSE-APACHEMIT
LICENSE-MITNotificationsYou must be signed in to change notification settings
rustcc/coroutine-rs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Coroutine library in Rust
[dependencies]coroutine ="0.8"
Basic usage of Coroutine
externcrate coroutine;use std::usize;use coroutine::asymmetric::Coroutine;fnmain(){let coro:Coroutine<i32> =Coroutine::spawn(|me,_|{for numin0..10{ me.yield_with(num);} usize::MAX});for numin coro{println!("{}", num.unwrap());}}
This program will print the following to the console
012345678918446744073709551615
For more detail, please runcargo doc --open
.
Basic single threaded coroutine support
Asymmetric Coroutines
Symmetric Coroutines
Thread-safe: can only resume a coroutine in one thread simultaneously
Basically it supports arm, i686, mips, mipsel and x86_64 platforms, but we have only tested in
OS X 10.10.*, x86_64, nightly
ArchLinux, x86_64, nightly
- The Rust developers (context switch ASM from libgreen)
About
Coroutine Library in Rust
Resources
License
Apache-2.0, MIT licenses found
Licenses found
Apache-2.0
LICENSE-APACHEMIT
LICENSE-MITUh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors13
Uh oh!
There was an error while loading.Please reload this page.