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-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,13 @@
1
1
# StableTasks.jl
2
2
3
-
StableTasks is a simple package with one main API `StableTasks.@spawn` (not exported by default).
3
+
StableTasks is a simple package that provides *type stable* tools for creating (regular and *sticky*) tasks. It has the following API (no exports):
4
+
5
+
*`StableTasks.@spawn`
6
+
*`StableTasks.@spawnat`
7
+
*`StableTasks.@fetch`
8
+
*`StableTasks.@fetchfrom`
9
+
10
+
## `StableTasks.@spawn`
4
11
5
12
It works like `Threads.@spawn`, except it is *type stable* to `fetch` from.
6
13
@@ -22,7 +29,9 @@ Stacktrace:
22
29
@ REPL[3]:1
23
30
```
24
31
25
-
The package also provides `StableTasks.@spawnat` (not exported), which is similar to `StableTasks.@spawn` but creates a *sticky* task (it won't migrate) on a specific thread.
32
+
## `StableTasks.@spawnat`
33
+
34
+
The package also provides `StableTasks.@spawnat`, which is similar to `StableTasks.@spawn` but creates a *sticky* task (that won't migrate) on a specific thread.
26
35
27
36
```julia
28
37
julia> t = StableTasks.@spawnat4 Threads.threadid();
@@ -31,7 +40,9 @@ julia> @inferred fetch(t)
31
40
4
32
41
```
33
42
34
-
For convenience, and similar to at Distributed.jl, there are also `@fetch` and `@fetchfrom` macros:
43
+
## `StableTasks.@fetch` and `StableTasks.@fetchfrom`
44
+
45
+
For convenience, and similar to at Distributed.jl, we also provide `@fetch` and `@fetchfrom` macros:
0 commit comments