From 84c55eeb8f0763e8dbd80ec62e84c1ed51833961 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 3 Mar 2022 10:45:00 +0000 Subject: [PATCH] Docstring improvements. --- compiler_gym/service/connection.py | 2 +- compiler_gym/service/connection_pool.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/compiler_gym/service/connection.py b/compiler_gym/service/connection.py index d3ee8628a3..8c739dc31c 100644 --- a/compiler_gym/service/connection.py +++ b/compiler_gym/service/connection.py @@ -792,7 +792,7 @@ def shutdown(self): except ServiceError as e: # close() can raise ServiceError if the service exists with a # non-zero return code. We swallow the error here as we are - # disposing o f the service. + # disposing of the service. logger.debug( "Ignoring service error during shutdown attempt: %s (%s)", e, diff --git a/compiler_gym/service/connection_pool.py b/compiler_gym/service/connection_pool.py index 47e85c1391..4722e0a288 100644 --- a/compiler_gym/service/connection_pool.py +++ b/compiler_gym/service/connection_pool.py @@ -42,6 +42,14 @@ class ServiceConnectionPool: `), it is automatically released back to the pool so that a future request for the same type of service will reuse the connection. + + :ivar pool: A pool of service connections that are ready for use. + + :vartype pool: Dict[ServiceConnectionCacheKey, List[CompilerGymServiceConnection]] + + :ivar allocated: The set of service connections that are currently in use. + + :vartype allocated: Set[CompilerGymServiceConnection] """ def __init__(self) -> None: