# Python create_task vs await for concurrent work

> Await runs one coroutine at a time. asyncio.create_task schedules work so several coroutines can progress together.

Source: https://fullbytedeveloper.com/blog/python-create-task-vs-await
Published here: 2026-11-26

I choose between `await` and `asyncio.create_task()` based on whether the next waits can overlap. Per asyncio docs, awaiting coroutines one after another finishes in the sum of their delays; creating Tasks lets those waits run concurrently. That is still one thread and one event loop, not OS-thread parallelism. [1]

Related reading: [Python async def is lazy until you await](/blog/python-async-def-is-lazy), [Python GIL: why threads are not truly parallel](/blog/python-gil-threads-not-parallel) and [JavaScript promises event loop quick start](/blog/javascript-promises-event-loop-quick-start). Browse the [dev-explainers topic](https://fullbytedeveloper.com/blog/topic/dev-explainers).

## Await in series when order is the point

The asyncio docs walk a timed example. Sequential awaits print `hello` after one second, then `world` after another two seconds, for about three seconds total: [1]

```bash
python3 - <<'PY'
import asyncio, time

async def say_after(delay, what):
    await asyncio.sleep(delay)
    print(what)

async def main():
    print(f"started at {time.strftime('%X')}")
    await say_after(1, "hello")
    await say_after(2, "world")
    print(f"finished at {time.strftime('%X')}")

asyncio.run(main())
PY
```

`asyncio.run()` is the top-level entry point that runs `main()` and manages the loop. [1]

## Create tasks when waits can overlap

The same docs show the concurrent form. Both Tasks are scheduled immediately, and waiting for both should take about two seconds instead of three: [1]

```bash
python3 - <<'PY'
import asyncio, time

async def say_after(delay, what):
    await asyncio.sleep(delay)
    print(what)

async def main():
    task1 = asyncio.create_task(say_after(1, "hello"))
    task2 = asyncio.create_task(say_after(2, "world"))
    print(f"started at {time.strftime('%X')}")
    await task1
    await task2
    print(f"finished at {time.strftime('%X')}")

asyncio.run(main())
PY
```

`create_task()` wraps a coroutine in a Task so the event loop can run it concurrently with other Tasks. You still await the Task when you need the result or to surface exceptions. [1]

## Prefer TaskGroup for structured sets

The docs present `asyncio.TaskGroup` as a more modern alternative. The await is implicit when the context manager exits: [1]

```python
async def main():
    async with asyncio.TaskGroup() as tg:
        task1 = tg.create_task(say_after(1, "hello"))
        task2 = tg.create_task(say_after(2, "world"))
        print(f"started at {time.strftime('%X')}")
    print(f"finished at {time.strftime('%X')}")
```

Use `TaskGroup` when the set of child tasks should succeed or fail together. Keep bare `create_task` when you need a Task that outlives a narrow block and you will await it later yourself. [1]

## Pick the shape that matches the wait graph

| Pattern | Use when |
| --- | --- |
| `await coro()` | The next step needs that result first |
| `create_task` then `await task` | Independent I/O waits can overlap |
| `async with TaskGroup()` | A set of child tasks should complete as a unit |
| `asyncio.run(main())` | You need a single script entry point [1] |

Calling an `async def` without await or create_task still only builds a coroutine object. See [Python async def is lazy](/blog/python-async-def-is-lazy). For why overlapping Tasks are not OS-thread parallelism, see [Python GIL threads are not parallel](/blog/python-gil-threads-not-parallel). [1]

## Failure checklist

1. Sequential awaits on independent I/O: wall time is the sum; switch to Tasks if overlap is safe
2. `create_task` without a later await: errors can be deferred or lost; await or use TaskGroup
3. Expecting CPU speedup from Tasks alone: still one event loop thread; use processes or native extensions for CPU [1]

Your next slow async script should get a wall-clock measurement of the sequential form, then the Task form, before anyone rewrites the architecture.

Send this to the teammate who awaits every call in a chain and then asks why the script feels slow.

## Sources

1. [Python asyncio: Coroutines and tasks, accessed 2026-11-26](https://docs.python.org/3/library/asyncio-task.html)
2. [Python async def is lazy until you await](https://fullbytedeveloper.com/blog/python-async-def-is-lazy)
