nupp.workers
Module contents
Types
| Type | Kind | Description |
|---|---|---|
Scope | interface | |
ScopeToken | interface | The cleanup contract a structured worker scope carries. |
Submittable | type | What may actually be submitted: a module member, or an outlined literal whose effectively-final captures can be... |
Task | type | The typed handle for one submitted function. |
Types#
Scopeinterface#
interface Scope is workers.ScopeToken
readonly spawn: function<F is workers.Submittable>(
borrows self: Scope,
F,
...: unpackof workers.Submitted(F)
): workers.Task<F>
readonly close: function(borrows self: Scope): nil
readonly drop: function(takes self: Scope): nil
endMethods
spawn#
spawn: function<F is workers.Submittable>(
borrows self: workers.PublicScope,
F,
...: unpackof workers.Submitted(F)
): workers.Task<F>Arguments
| Name | Type | Description |
|---|---|---|
borrows self | workers.PublicScope | |
? | F | |
... | unpackof workers.Submitted(F) |
Returns
| Type | Description |
|---|---|
workers.Task<F> |
close#
close: function(borrows self: workers.PublicScope): nilArguments
| Name | Type | Description |
|---|---|---|
borrows self | workers.PublicScope |
Returns
| Type | Description |
|---|---|
nil |
drop#
drop: function(takes self: workers.PublicScope): nilArguments
| Name | Type | Description |
|---|---|---|
takes self | workers.PublicScope |
Returns
| Type | Description |
|---|---|
nil |
ScopeTokeninterface#
affine interface ScopeToken
terminal readonly drop: function(takes self: ScopeToken): nil
endThe cleanup contract a structured worker scope carries.
Methods
drop#
drop: function(takes self: workers.ScopeToken): nilArguments
| Name | Type | Description |
|---|---|---|
takes self | workers.ScopeToken |
Returns
| Type | Description |
|---|---|
nil |
Submittabletype#
What may actually be submitted: a module member, or an outlined literal whose effectively-final captures can be copied to another lane. Exported so a task scope can hold its fork to the same bound without linking this module.
Tasktype#
type Task<F is Callable> = TaskType(F)The typed handle for one submitted function.
Type parameters
| Name | Description |
|---|---|
F |