Expand description
Thread-local storage for compute resources
This module provides thread-local access to compute resources (Rayon pool and semaphore) for Tokio worker threads. This eliminates the need to pass Runtime or ComputePool references through async function calls.
Structs§
- Compute
Context - Compute resources available to a Tokio worker thread
Functions§
- assert_
compute_ context - Assert that the current thread has compute context initialized
- get_
pool - Get the compute pool from thread-local context
- has_
compute_ context - Check if the current thread has compute context initialized
- initialize_
context - Initialize the thread-local compute context
- try_
acquire_ block_ permit - Try to acquire a block_in_place permit from thread-local context
- with_
context - Access the thread-local compute context