Skip to content

Commit 32af800

Browse files
authored
Update README.md
1 parent b7eba21 commit 32af800

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# StableTasks.jl
22

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`
411

512
It works like `Threads.@spawn`, except it is *type stable* to `fetch` from.
613

@@ -22,7 +29,9 @@ Stacktrace:
2229
@ REPL[3]:1
2330
```
2431

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.
2635

2736
```julia
2837
julia> t = StableTasks.@spawnat 4 Threads.threadid();
@@ -31,7 +40,9 @@ julia> @inferred fetch(t)
3140
4
3241
```
3342

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:
3546

3647
```julia
3748
julia> StableTasks.@fetch 3+3

0 commit comments

Comments
 (0)