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
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,13 @@ Stacktrace:
29
29
@ REPL[3]:1
30
30
```
31
31
32
+
Note regarding the return type of `@spawn`:
33
+
*`Threads.@spawn` returns a value of the concrete type `Task`
34
+
* In contrast, the return type of `StableTasks.@spawn` may depend on any and all of the following:
35
+
* the configuration of type inference in the Julia compiler
36
+
* the return type of the input function
37
+
* in particular, `typeof(StableTasks.@spawn 3) != typeof(StableTasks.@spawn 3.0)`, because `typeof(3) !== typeof(3.0)`
38
+
32
39
## `StableTasks.@spawnat`
33
40
34
41
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.
@@ -40,6 +47,8 @@ julia> @inferred fetch(t)
40
47
4
41
48
```
42
49
50
+
The note regarding the return type of `@spawn` also applies here.
51
+
43
52
## `StableTasks.@fetch` and `StableTasks.@fetchfrom`
44
53
45
54
For convenience, and in analogy to at Distributed.jl, we also provide `@fetch` and `@fetchfrom` macros:
0 commit comments