mlos_bench.event_loop_context
EventLoopContext class definition.
Attributes
Type variable for the return type of an   | 
|
Type variable for the return type of a   | 
Classes
EventLoopContext encapsulates a background thread for   | 
Module Contents
- class mlos_bench.event_loop_context.EventLoopContext[source]
 EventLoopContext encapsulates a background thread for
asyncioevent loop processing as an aid for context managers.There is generally only expected to be one of these, either as a base class instance if it’s specific to that functionality or for the full mlos_bench process to support parallel trial runners, for instance.
It’s
enter()andexit()routines are expected to be called from the caller’s context manager routines (e.g., __enter__ and __exit__).- enter() None[source]
 Manages starting the background thread for event loop processing.
- Return type:
 None
- exit() None[source]
 Manages cleaning up the background thread for event loop processing.
- Return type:
 None
- run_coroutine(coro: collections.abc.Coroutine[Any, Any, CoroReturnType]) FutureReturnType[source]
 Runs the given coroutine in the background event loop thread and returns a Future that can be used to wait for the result.
- Parameters:
 coro (Coroutine[Any, Any, CoroReturnType]) – The coroutine to run.
- Returns:
 A future that will be completed when the coroutine completes.
- Return type: