Web Workers

Demonstrating non-blocking concurrent operations using Web Workers in Next.js. Each worker runs in its own thread — try starting all four at once.

Worker A (100M)

Progress0%
Count: 0Status: Ready

Worker B (250M)

Progress0%
Count: 0Status: Ready

Worker C (500M)

Progress0%
Count: 0Status: Ready

Worker D (897M)

Progress0%
Count: 0Status: Ready

Blocking (Main Thread)

Count: 0Status: Ready

⚠️ Will freeze the UI until completion

Try this:Start all four workers simultaneously — the UI stays responsive. Then run the blocking operation to see the difference.

Web Workers run independently without blocking each other or the UI, while the main-thread computation freezes everything until it finishes.