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
Constructs an `AbstractScope` from a set of scope specifiers. Each element in
216
+
`scs` is a separate specifier; if `scs` is empty, an empty `UnionScope()` is
217
+
produced; if `scs` has one element, then exactly one specifier is constructed;
218
+
if `scs` has more than one element, a `UnionScope` of the scopes specified by
219
+
`scs` is constructed. A variety of specifiers can be passed to construct a
220
+
scope:
221
+
- `:any` - Constructs an `AnyScope()`
222
+
- `:default` - Constructs a `DefaultScope()`
223
+
- `(scs...,)` - Constructs a `UnionScope` of scopes, each specified by `scs`
224
+
- `thread=tid` or `threads=[tids...]` - Constructs an `ExactScope` or `UnionScope` containing all `Dagger.ThreadProc`s with thread ID `tid`/`tids` across all workers.
225
+
- `worker=wid` or `workers=[wids...]` - Constructs a `ProcessScope` or `UnionScope` containing all `Dagger.ThreadProc`s with worker ID `wid`/`wids` across all threads.
226
+
- `thread=tid`/`threads=tids` and `worker=wid`/`workers=wids` - Constructs an `ExactScope`, `ProcessScope`, or `UnionScope` containing all `Dagger.ThreadProc`s with worker ID `wid`/`wids` and threads `tid`/`tids`.
227
+
228
+
Aside from the worker and thread specifiers, it's possible to add custom
229
+
specifiers for scoping to other kinds of processors (like GPUs) or providing
230
+
different ways to specify a scope. Specifier selection is determined by a
231
+
precedence ordering: by default, all specifiers have precedence `0`, which can
232
+
be changed by defining `scope_key_precedence(::Val{spec}) = precedence` (where
233
+
`spec` is the specifier as a `Symbol)`. The specifier with the highest
234
+
precedence in a set of specifiers is used to determine the scope by calling
235
+
`to_scope(::Val{spec}, sc::NamedTuple)` (where `sc` is the full set of
236
+
specifiers), which should be overriden for each custom specifier, and which
0 commit comments