Skip to main content

unmark_top_level_task_may_leak_eventually_consistent_state

Function unmark_top_level_task_may_leak_eventually_consistent_state 

Source
pub fn unmark_top_level_task_may_leak_eventually_consistent_state()
Expand description

Unmarks the current task context as being in a top-level task. The opposite of mark_top_level_task.

This utility can be okay in unit tests, where we’re observing the internal behavior of turbo-tasks, but otherwise, it is probably a mistake to call this function.

Calling this will allow eventually-consistent reads at the top-level, potentially exposing incomplete computations and internal errors caused by eventual consistency that would’ve been caught when the function was re-run. A strongly-consistent read re-runs parts of a task until all of the dependencies have settled.