FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add inline (zero-worker) execution mode for single-threaded use by boxerab · Pull Request #802 · taskflow/taskflow · GitHub

Add inline (zero-worker) execution mode for single-threaded use - #802

Open
boxerab wants to merge 1 commit into
taskflow:masterfrom
boxerab:grok-inline-executor
Open

boxerab wants to merge 1 commit into
taskflow:masterfrom
boxerab:grok-inline-executor

Conversation

boxerab commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

When an Executor is constructed with 0 workers it now runs task graphs synchronously on the calling thread instead of spawning a worker pool, so the process stays truly single-threaded (no worker/notifier threads).

_run_inline() executes a fully-built static graph in topological order, mirroring the scheduler's rules: a node runs once its strong (non-conditioner) predecessors are met; a condition node runs its int() work and activates only the selected successor.

This new mode handles Static, Module (composed_of, recursed), Condition and MultiCondition tasks.

this_worker_id() reports 0 in inline mode (the caller is the sole worker).

References: #797

When an Executor is constructed with 0 workers it now runs task graphs
synchronously on the calling thread instead of spawning a worker pool,
so the process stays truly single-threaded (no worker/notifier threads).

_run_inline() executes a fully-built static graph in topological order,
mirroring the scheduler's rules: a node runs once its strong
(non-conditioner) predecessors are met; a condition node runs its int()
work and activates only the selected successor. Handles Static, Module
(composed_of, recursed), Condition and MultiCondition tasks.
this_worker_id() reports 0 in inline mode (the caller is the sole
worker).

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL