Expand description
Enhanced LSP cancellation infrastructure with thread-safe atomic operations
This module provides comprehensive cancellation support for Perl LSP operations, including provider-specific cancellation tokens, cleanup coordination, and performance-optimized atomic operations.
§Architecture
The cancellation system implements a dual-layer design:
- Global cancellation registry - Thread-safe coordination of all active requests
- Provider-specific tokens - Context-aware cancellation with cleanup callbacks
§Performance Characteristics
- Cancellation check latency: <100μs using atomic operations
- End-to-end response time: <50ms from $/cancelRequest to error response
- Memory overhead: <1MB for complete cancellation infrastructure
- Thread-safe concurrent operations with zero-copy atomic checks
Macros§
- check_
cancellation - Macro for adding cancellation checkpoints with minimal performance impact
Structs§
- Cancellation
Metrics - Performance metrics for cancellation system
- Cancellation
Registry - Thread-safe cancellation registry for concurrent request coordination
- Perl
LspCancellation Token - Thread-safe cancellation token with atomic operations Optimized for <100μs check latency using atomic operations
- Provider
Cleanup Context - Provider cleanup context for graceful cancellation handling
- Request
Cleanup Guard - RAII guard for automatic cancellation cleanup
Enums§
- Cancellation
Error - Cancellation errors
Statics§
- GLOBAL_
CANCELLATION_ REGISTRY - Default global cancellation registry instance for thread-safe cancellation coordination
Traits§
- Cancellable
Provider - Trait for cancellable LSP providers