What asyncio.gather Actually Does

Select all that apply. Which statements about asyncio.gather(...) are true?

  1. It runs all of its coroutines on a single thread, and the event loop only switches between them at await points inside each coroutine.
  2. It runs each coroutine in a separate OS thread, so CPU-bound coroutines passed to it get true parallel execution across cores.
  3. The list of results it returns preserves the order the coroutines were passed in, not the order in which they actually finished.
  4. If none of the coroutines ever reach an await expression, gather still overlaps their execution, running a few lines of each in turn.
A

If none of the coroutines ever reach an await expression, gather still overlaps their execution, running a few lines of each in turn.

B

It runs all of its coroutines on a single thread, and the event loop only switches between them at await points inside each coroutine.

C

It runs each coroutine in a separate OS thread, so CPU-bound coroutines passed to it get true parallel execution across cores.

D

The list of results it returns preserves the order the coroutines were passed in, not the order in which they actually finished.