Concurrency visualised

See threading in motion

A live simulator for async, sync, thread pools, sub-threads, fork, and task managers — with real response-time analytics.

Open simulator Learn concepts

Six concurrency models

Each mode runs a real simulation with configurable tasks, durations, and pool sizes. Watch them compete on response time.

01
Synchronous

Tasks execute one at a time, blocking until each finishes. Simple, predictable, but throughput suffers under I/O waits. Total time = sum of all task times.

02
Async / Await

A single event loop interleaves I/O-bound tasks. While one awaits, another runs. No threads, no GIL — overhead is minimal. Ideal for network-heavy workloads.

03
Thread pool

N pre-allocated worker threads share a FIFO queue. Tasks dispatch instantly to idle threads; full queues block or reject. Classic WSGI concurrency model.

04
Sub-threading

Each task spawns its own thread on demand. High parallelism, high overhead. Useful for truly independent workloads where pool management isn't worth the complexity.

05
Fork / Multiprocess

OS-level process cloning. Each fork gets its own memory and GIL — true CPU parallelism in Python. Heavier than threads; best for CPU-bound tasks like ML inference.

06
Task manager

Priority-based scheduling with preemption. High-priority tasks jump the queue; low-priority tasks can be cancelled under load. Models Celery, Ray, and similar systems.

6×
Concurrency models simulated
Task combinations to explore
ms
Resolution on response time
0deps
Pure browser, no libraries

Pick a mode, configure, run

Set task count, duration, pool size, and I/O ratio. Each mode shows live thread bars, a Gantt timeline, and response-time distribution.

Synchronous

Number of tasks
8
Task duration (ms)
1200ms
Duration variance (%)
30%
Pool / worker size
4
I/O wait ratio (%)
60%
Queue max size
12
Priority levels (task mgr)
Sim speed
Completed
0
Queued
0
Rejected
0
Active workers
0
Avg response
Throughput/s
Workers
Gantt timeline
Response time per task (ms)
Task queue (FIFO)
Queue empty
Mode comparison (avg ms)
Run a simulation to see comparison.
Event log

Start your AI project

From LLM integration to production inference — we handle the full stack.