Commit 2c2c01a
committed
Add per-session mutex locking to prevent race conditions
Commands executing concurrently within the same session could cause
race conditions and interleaved output. This adds per-session mutexes
using async-mutex to serialize execution within each session while
preserving parallelism across different sessions.
The withSession API enables atomic multi-command operations where the
lock is held for the entire callback. Background streaming mode allows
long-running processes like servers to release the lock after startup
so other commands can proceed.1 parent 472d5ae commit 2c2c01a
File tree
10 files changed
+1095
-541
lines changed- .changeset
- packages/sandbox-container
- src
- core
- services
- tests/services
10 files changed
+1095
-541
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
59 | 71 | | |
60 | 72 | | |
61 | 73 | | |
| |||
0 commit comments