pub async fn apply_effects(source: impl CollectiblesSource) -> Result<()>
Expand description
Applies all effects that have been emitted by an operations.
Usually it’s important that effects are strongly consistent, so one want to use apply_effects
only on operations that have been strongly consistently read before.
The order of execution is not defined and effects are executed in parallel.
apply_effects
must only be used in a “once” task. When used in a “root” task, a
combination of get_effects
and Effects::apply
must be used.
§Example
let operation = some_turbo_tasks_function(args);
let result = operation.strongly_consistent().await?;
apply_effects(operation).await?;