Skip to main content

plan_thread_mode

Function plan_thread_mode 

Source
pub fn plan_thread_mode(
    workspace: WorkspaceModeRequest,
    has_explicit_path: bool,
    auto_default: AutoWorkspaceDefault,
    supports_reflink: bool,
) -> ThreadMode
Expand description

Plan the concrete ThreadMode from the caller request and host facts.

Rules (matching CLI resolve_thread_mode):

  • Explicit workspace modes win as-is (including materialized without reflinks — honesty messaging stays CLI-side).
  • Auto with an explicit --path candidates materialized (navigable checkout), then may downgrade to solid when the filesystem lacks reflinks.
  • Auto without path uses auto_default, then the same reflink downgrade.