Test your knowledge

Let's see whether you can answer the following questions correctly:

  1. Future does which of the following?
    1. Encapsulates the asynchronous execution of a callable
    2. Encapsulates the synchronous execution of a callable
    3. Runs an asynchronous method synchronously on the executor specified as an argument
  1. The concurrent.futures.ThreadPoolExecutor class provides us with which of the following?
    1. A high-level interface for synchronously executing callables
    2. A high-level interface for asynchronously executing callables
    3. A high-level interface for composing HTTP requests
  1. The @tornado.concurrent.run_on_executor decorator allows us to do which of the following?
    1. Run an asynchronous method synchronously on an executor
    2. Run an asynchronous method on an executor without generating Future
    3. Run a synchronous method asynchronously on an executor
  1. The recommended way to write asynchronous code in Tornado is to use which of the following?
    1. Coroutines
    2. Chained callbacks
    3. Subroutines
  1. Which of the following fixtures, defined by the pytest-tornasync pytest plugin, provide an asynchronous HTTP client for tests?
    1. tornado_client
    2. http_client
    3. http_server_client
  1. If we want to convert the bytes in a JSON response body into a Python dictionary, we can use which of the following functions?
    1. tornado.escape.json_decode
    2. tornado.escape.byte_decode
    3. tornado.escape.response_body_decode

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.190.93