Skip to content

docs: Enhance documentation with tutorials and examples for external developers #659

Description

@kcenon

What

Enhance thread_system documentation with tutorials, expanded examples, FAQ, and troubleshooting guide for external developers.

Why

thread_system has 19 example directories but lacks guided tutorials explaining when and how to choose between thread pool types, queue implementations, and scheduling strategies. External developers need decision guides and step-by-step walkthroughs.

Where

File Action
docs/tutorial_threadpool.dox Create — Thread pool selection and usage tutorial
docs/tutorial_dag.dox Create — DAG scheduling tutorial
docs/tutorial_lockfree.dox Create — Lock-free queue patterns tutorial
docs/faq.dox Create — FAQ
docs/troubleshooting.dox Create — Common issues
docs/mainpage.dox Update — Add tutorial links
Doxyfile Update INPUT paths

How

1. Thread Pool Selection Guide Tutorial

  • When to use basic thread_pool vs typed_thread_pool
  • Work-stealing configuration
  • Sizing guidelines based on workload type (CPU-bound vs I/O-bound)

2. DAG Scheduling Tutorial

  • Defining task dependencies
  • Execution order guarantees
  • Error handling in DAG chains

3. Lock-Free Queue Patterns

  • MPMC vs SPSC queue selection
  • Hazard pointer usage
  • Performance characteristics

4. FAQ

  • How many threads should I use?
  • How to handle task cancellation?
  • Thread pool vs std::async?
  • Integration with monitoring_system

5. Troubleshooting

  • Deadlock detection
  • Memory leak with futures
  • Platform-specific threading issues

Acceptance Criteria

  • 3 tutorial pages created
  • FAQ with 8+ entries
  • Troubleshooting guide
  • mainpage.dox updated
  • Doxygen builds without warnings

Related

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions