subsystem-summary-of-work

Summarize the Stellar Core work subsystem's asynchronous task-execution framework and key classes.

3.3k|1.1k|Updated Nov 24, 2014
One-click install
npx skills add https://github.com/stellar/stellar-core --skill subsystem-summary-of-work
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subsystem-summary-of-work
Source: https://github.com/stellar/stellar-core/tree/main/.claude/skills/subsystem-summary-of-work
Command: npx skills add https://github.com/stellar/stellar-core --skill subsystem-summary-of-work

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a clear, concise overview of the complex work subsystem within Stellar Core, making it easier to grasp its architecture and functionality.

Core Features & Use Cases

  • Architectural Overview: Explains the finite state machine (FSM) model and cooperative, single-threaded execution.
  • Key Component Breakdown: Details the purpose and function of core classes like BasicWork, Work, WorkScheduler, WorkSequence, BatchWork, ConditionalWork, and WorkWithCallback.
  • Use Case: A new developer joining the Stellar Core project can use this Skill to quickly understand how asynchronous tasks are managed, reducing onboarding time and improving comprehension of the codebase.

Quick Start

Read this skill for a token-efficient summary of the work subsystem.

Frequently Asked Questions about subsystem-summary-of-work

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does asynchronous task execution work in Stellar Core?

Asynchronous task execution in Stellar Core operates through a cooperative, single-threaded framework. This subsystem uses a finite state machine (FSM) model to manage hierarchical task trees, executing sequential and parallel operations without blocking the main event loop.

What is the finite state machine model used for Stellar Core's work subsystem?

The finite state machine (FSM) model in Stellar Core's work subsystem governs the lifecycle of asynchronous tasks. It defines state transitions for work execution, enabling retry logic, conditional gating, and orderly abort or shutdown mechanisms across hierarchical task trees.

How do I manage retry logic and conditional task gating in Stellar Core?

You manage retry logic and conditional task gating in Stellar Core using specific classes within the work subsystem. Classes like ConditionalWork handle execution dependencies, while the base Work class provides built-in retry mechanisms for resilient asynchronous task processing.

Can I execute parallel and sequential asynchronous tasks in Stellar Core?

You can execute parallel and sequential asynchronous tasks in Stellar Core using WorkSequence and BatchWork classes. These components orchestrate hierarchical task trees within the single-threaded, cooperative scheduler to process tasks efficiently without concurrent thread blocking.

How do I implement an orderly abort and shutdown for asynchronous tasks in Stellar Core?

You implement orderly abort and shutdown mechanisms in Stellar Core by leveraging the finite state machine transitions within the work subsystem. The framework ensures hierarchical task trees are cleanly terminated and cleaned up during scheduler shutdown operations.

What classes handle work scheduling and callbacks in Stellar Core's architecture?

WorkScheduler manages the overall cooperative execution loop in Stellar Core's architecture. WorkWithCallback integrates custom completion logic, while BasicWork and Work serve as foundational classes for defining asynchronous tasks within the single-threaded state machine framework.