Skip to content

Commit 9e31cf5

Browse files
committed
blog: illustrate stack deformation across ticks
Update featured image to show async deforming the call stack: a then() callback runs on the next tick with restored tags, so group attribution changes. Add a short bridge paragraph tying the diagram to k6 tag behavior. Session-ID: ses_39d99b9c2ffeSKxHPZAk9P7E1O
1 parent 6f661d7 commit 9e31cf5

File tree

2 files changed

+99
-86
lines changed

2 files changed

+99
-86
lines changed

www/blog/2026-02-15-k6-structured-concurrency/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ expect to work with sync `group()` doesn't work once async gets introduced.
1515
This post is about using structured concurrency to align k6's JavaScript runtime
1616
with your expectations.
1717

18+
The diagram at the top shows what goes wrong. Async doesn't just add time, it
19+
deforms your call stack. Some code runs on the stack you are in now, and some
20+
code runs on a new stack on the next tick. When that happens, the "current" tags
21+
are different, because `group()` has already unwound and restored them.
22+
1823
## Why `group()` can't fix this on its own
1924

2025
k6's `group()` behaves like a `try/finally`-scoped tag mutation: set a tag,

www/blog/2026-02-15-k6-structured-concurrency/k6-structured-concurrency.svg

Lines changed: 94 additions & 86 deletions
Loading

0 commit comments

Comments
 (0)