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
Copy file name to clipboardExpand all lines: README.md
+14-8
Original file line number
Diff line number
Diff line change
@@ -4,27 +4,33 @@ Per-thread async rust executor for windows.
4
4
Each task is backed by a [message-only window][1].
5
5
The executor thread runs the native [windows message loop][2] which dispatches wake messages to the tasks window procedure which polls the task future.
6
6
7
-
As a thin wrapper for WinAPI calls the whole executor is implemented in around 300 lines of code.
8
-
9
7
## Features
10
8
11
-
- Easy data sharing within a thread because `Send` or `Sync` is not required for the task future
12
-
-A task can spawn new tasks on the same thread
9
+
- Easy data sharing within a thread because `Send` or `Sync` is not required for the task future.
10
+
-Runs multiply tasks on the same thread. Tasks can spawn new tasks and await the result.
13
11
- Modal windows like menus do not block other tasks running on the same thread.
14
12
- Helper code to implement window procedures with closures that can have state.
15
13
14
+
## Alternative Backend: `async-task`
15
+
16
+
Selected by the `backend-async-task` cargo feature.
17
+
Uses `async-task`s task abstraction instead of a window per task to store the future.
18
+
Scheduling a tasks means posting its runnable to the threads message queue (similar to `windows-executor` see below).
19
+
16
20
## Comparison with similar crates
17
21
22
+
Both of those listed crates run one taks/future per thread in their and expose
23
+
only `block_on()`.
24
+
[Is block_on an executor?](https://github.com/rust-lang/async-book/issues/219)
0 commit comments