Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for contextmanager_in_threadpool (0.24 sec)

  1. fastapi/concurrency.py

    from starlette.concurrency import (  # noqa
        run_until_first_complete as run_until_first_complete,
    )
    
    _T = TypeVar("_T")
    
    
    @asynccontextmanager
    async def contextmanager_in_threadpool(
        cm: ContextManager[_T],
    ) -> AsyncGenerator[_T, None]:
        # blocking __exit__ from running waiting on a free thread
        # can create race conditions/deadlocks if the context manager itself
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Dec 25 17:57:35 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  2. fastapi/dependencies/utils.py

        sequence_types,
        serialize_sequence_value,
        value_is_sequence,
    )
    from fastapi.background import BackgroundTasks
    from fastapi.concurrency import (
        asynccontextmanager,
        contextmanager_in_threadpool,
    )
    from fastapi.dependencies.models import Dependant, SecurityRequirement
    from fastapi.logger import logger
    from fastapi.security.base import SecurityBase
    from fastapi.security.oauth2 import OAuth2, SecurityScopes
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
Back to top