parameters: (protocol: PythonProtocol, context: ProtocolContext)
docstring: Execute a PythonProtocol using the given ProtocolContext.
  
          Runs the protocol asynchronously in a child thread.
docstring_summary: Execute a PythonProtocol using the given ProtocolContext.
docstring_tokens: Execute a PythonProtocol using the given ProtocolContext .
function: async def execute(protocol: PythonProtocol, context: ProtocolContext) -> None:
          """Execute a PythonProtocol using the given ProtocolContext.
  
          Runs the protocol asynchronously in a child thread.
          """
          loop = asyncio.get_running_loop()
  
          with ThreadPoolExecutor(max_workers=1) as executor:
              await loop.run_in_executor(
                  executor=executor,
                  func=partial(protocol.run, context),
              )
function_tokens: async def execute ( protocol : PythonProtocol , context : ProtocolContext ) -> None : loop = asyncio . get_running_loop ( ) with ThreadPoolExecutor ( max_workers = 1 ) as executor : await loop . run_in_executor ( executor = executor , func = partial ( protocol . run , context ) , )