You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[x] Preemptive(`not supported in windows`): even if the coroutine enters a dead loop, it can still be seized, see [example](https://github.com/loongs-zhang/open-coroutine/blob/master/open-coroutine/examples/preemptive.rs);
16
+
-[x] Hook: you are free to use most of the slow system calls in coroutine;
17
+
-[x] Scalable: the size of the coroutine stack supports unlimited expansion, and immediately shrinks to the original size after use, see [example](https://github.com/loongs-zhang/open-coroutine/blob/master/open-coroutine/examples/scalable_stack.rs);
18
+
-[x] io_uring(`only in linux`): supports and is compatible with io_uring in terms of local file IO and network IO. If it's not supported on your system, it will fall back to non-blocking IO;
19
+
-[x] Priority: support custom task and coroutine priority;
20
+
-[x] Work Stealing: internally using a lock free work steel queue;
21
+
-[x] Compatibility: the implementation of open-coroutine is no async, but it is compatible with async, which means you can use this crate in tokeno/sync-std/smol/...;
22
+
-[x] Platforms: running on Linux, MacOS and Windows;
18
23
19
-
## Status
24
+
## 🕊 Roadmap
20
25
21
-
Still under development, please `do not` use this library in the `production` environment !
26
+
-[ ] support `#[open_coroutine::all_join]` and `#[open_coroutine::any_join]` macro to wait coroutines;
27
+
-[ ] add synchronization toolkit;
28
+
-[ ] support and compatibility for AF_XDP socket;
22
29
23
-
## How to use this library ?
30
+
## 📖 Quick Start
24
31
25
32
### step1: add dependency to your Cargo.toml
26
33
@@ -39,253 +46,41 @@ fn main() {
39
46
}
40
47
```
41
48
42
-
### step3: enjoy the performance improvement brought by open-coroutine !
43
-
44
-
## Examples
45
-
46
-
### Amazing preemptive schedule
47
-
48
-
Note: not supported for windows
49
+
### step3: create a task
49
50
50
51
```rust
51
52
#[open_coroutine::main]
52
-
fnmain() ->std::io::Result<()> {
53
-
cfg_if::cfg_if! {
54
-
if #[cfg(all(unix, feature ="preemptive-schedule"))] {
0 commit comments