How python-thread/thread works
Thread is a Python threading extension for type-safe thread execution, result retrieval, hooks, and dataset-oriented concurrent processing. Users can instantiate Thread directly or invoke a threaded-decorated function; for datasets, processor creates and starts ConcurrentProcessing, which partitions work into chunks and runs workers. The core thread wrapper handles status, results, and errors, with shared configuration and typing support. The graph reflects the sampled implementation and indexed references; detailed CLI behavior and other unsampled internals are not inferred.
Main entry points: thread.py Thread and concurrent processing · _threaded.py Thread decorator · _processor.py Processor decorator · cli.py CLI adapter
Components 12
Public API
- Thread decorator
src/thread/decorators/_threaded.py - Processor decorator
src/thread/decorators/_processor.py - CLI adapter
src/thread/cli.py
Concurrent execution
- Thread and concurrent processing
src/thread/thread.py
Shared support
- Chunk splitter
src/thread/utils/algorithm.py - Runtime settings
src/thread/utils/config.py - Thread exceptions
src/thread/exceptions.py - Typing protocols
src/thread/_types.py
Other components
- Python caller
- Input dataset
- Python threading
- Optional thread-cli
Connections 13
- Python caller → Thread decorator: decorates function
src/thread/decorators/_threaded.py - Thread decorator → Thread and concurrent processing: creates and starts
src/thread/decorators/_threaded.py - Python caller → Processor decorator: decorates function
src/thread/decorators/_processor.py - Python caller → Input dataset: supplies
README.md - Processor decorator → Thread and concurrent processing: creates and starts
src/thread/decorators/_processor.py - Thread and concurrent processing → Python threading: extends and starts
src/thread/thread.py - Thread and concurrent processing → Chunk splitter: splits dataset
src/thread/thread.py - Thread and concurrent processing → Runtime settings: reads settings
src/thread/thread.py - Thread and concurrent processing → Thread exceptions: raises and handles
src/thread/thread.py - Thread decorator → Typing protocols: uses type definitions
src/thread/decorators/_threaded.py - Processor decorator → Typing protocols: uses type definitions
src/thread/decorators/_processor.py - Python caller → CLI adapter: invokes command
- CLI adapter → Optional thread-cli: loads optionally
src/thread/cli.py