ox
Members list
Packages
Type members
Classlikes
A fork started using forkCancellable, backed by a (virtual) thread.
Attributes
- Supertypes
A fork started using fork, forkDaemon or forkUnsupervised, backed by a (virtual) thread.
A fork started using fork, forkDaemon or forkUnsupervised, backed by a (virtual) thread.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CancellableFork[T]
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
- Self type
-
NoOpSupervisor.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class DefaultSupervisorobject NoOpSupervisor.type
Value members
Concrete methods
Starts a fork (logical thread of execution), which is guaranteed to complete before the enclosing supervised or scoped block completes.
Starts a fork (logical thread of execution), which is guaranteed to complete before the enclosing supervised or scoped block completes.
In case an exception is thrown while evaluating t
, it will be thrown when calling the returned Fork's .join()
method.
If ran in a supervised scope, an exception will cause the enclosing scope to end. Moreover, the scope will end only once all supervised forks (such as this one) complete.
Attributes
A cancellable fork is created by starting a nested scope in a fork, and then starting a fork there. Hence, it is more expensive than fork
, as two virtual threads are started.
A cancellable fork is created by starting a nested scope in a fork, and then starting a fork there. Hence, it is more expensive than fork
, as two virtual threads are started.
Otherwise, works same as forkUnsupervised.
Attributes
Starts a fork (logical thread of execution), which is guaranteed to complete before the enclosing supervised or scoped block exits.
Starts a fork (logical thread of execution), which is guaranteed to complete before the enclosing supervised or scoped block exits.
In case an exception is thrown while evaluating t
, it will be thrown when calling the returned Fork's .join()
method.
If ran in a supervised scope, an exception will cause the enclosing scope to end. However, unlike fork, the enclosing scope might end (cancelling this fork) before this fork completes.
If ran in an unsupervised scope, behaves the same as fork.
Attributes
Starts a fork (logical thread of execution), which is guaranteed to complete before the enclosing supervised or scoped block exits.
Starts a fork (logical thread of execution), which is guaranteed to complete before the enclosing supervised or scoped block exits.
In case an exception is thrown while evaluating t
, it will be thrown when calling the returned Fork's .join()
method.
Success or failure isn't signalled to the supervisor. If ran in an unsupervised scope, behaves the same as fork.
Attributes
Runs the given computations in parallel. If any fails, interrupts the others, and re-throws the exception.
Runs the given computations in parallel. If any fails, interrupts the others, and re-throws the exception.
Attributes
Runs the given computations in parallel. If any fails, interrupts the others, and re-throws the exception.
Runs the given computations in parallel. If any fails, interrupts the others, and re-throws the exception.
Attributes
Runs the given computations in parallel. If any fails, interrupts the others, and re-throws the exception.
Runs the given computations in parallel. If any fails, interrupts the others, and re-throws the exception.
Attributes
Runs the given computations in parallel, with at most parallelism
running in parallel at the same time. If any computation fails, interrupts the others, and re-throws the exception.
Runs the given computations in parallel, with at most parallelism
running in parallel at the same time. If any computation fails, interrupts the others, and re-throws the exception.
Attributes
Returns the result of the first computation to complete (either successfully or with an exception).
Returns the result of the first computation to complete (either successfully or with an exception).
Attributes
Returns the result of the first computation to complete (either successfully or with an exception).
Returns the result of the first computation to complete (either successfully or with an exception).
Attributes
Returns the result of the first computation to complete successfully, or if all fail - throws the first exception.
Returns the result of the first computation to complete successfully, or if all fail - throws the first exception.
Attributes
Returns the result of the first computation to complete successfully, or if all fail - throws the first exception.
Returns the result of the first computation to complete successfully, or if all fail - throws the first exception.
Attributes
Repeat evaluating f
until it evaluates to true
.
Repeat evaluating f
until it evaluates to true
.
Attributes
Repeat evaluating f
while it evaluates to true
.
Repeat evaluating f
while it evaluates to true
.
Attributes
Starts a new scope, which allows starting forks in the given code block f
. Forks can be started using fork.
Starts a new scope, which allows starting forks in the given code block f
. Forks can be started using fork.
The code is ran in unsupervised mode, that is:
- the scope ends once the
f
code block completes; this causes any running forks started withinf
to be cancelled - the scope completes (that is, this method returns) only once all forks started by
f
have completed (either successfully, or with an exception) - fork failures aren't handled in any special way, but can be inspected using Fork.join
Forks created using forkDaemon and forkUnsupervised will behave exactly the same as forks created using fork.
Attributes
- See also
-
supervised Starts a scope in supervised mode
Starts a new scope, which allows starting forks in the given code block f
. Forks can be started using fork, forkDaemon and forkUnsupervised.
Starts a new scope, which allows starting forks in the given code block f
. Forks can be started using fork, forkDaemon and forkUnsupervised.
The code is ran in supervised mode, that is:
- the scope ends once all non-daemon, supervised forks (including the
f
code block) succeed - the scope also ends once the first supervised fork (including the
f
code block) fails with an exception - when the scope ends, all running forks are cancelled
- the scope completes (that is, this method returns) only once all forks started by
f
have completed (either successfully, or with an exception)
Attributes
- See also
-
scoped Starts a scope in unsupervised mode
Change the supervisor that is being used when running f
. Doesn't affect existing usages of the current supervisor, or forks ran outside of f
.
Change the supervisor that is being used when running f
. Doesn't affect existing usages of the current supervisor, or forks ran outside of f
.
Attributes
The result of computation t
, if it took less than duration
, and a TimeoutException otherwise.
The result of computation t
, if it took less than duration
, and a TimeoutException otherwise.
Attributes
- Throws
-
TimeoutException
If
t
took more thanduration
.
A Some
if the computation t
took less than duration
, and None
otherwise.
A Some
if the computation t
took less than duration
, and None
otherwise.
Attributes
Use the given resource in the current scope. The resource is allocated using acquire
, and released after the scope is done using release
. Releasing is uninterruptible.
Use the given resource in the current scope. The resource is allocated using acquire
, and released after the scope is done using release
. Releasing is uninterruptible.