Concurrency and Source Panels
Client and Worker Files
Replay one Kotlin execution where a client request calls a worker helper.
source panel
When an example has more than one source file, replay keeps each file in its own panel while preserving one ordered trace stream. The Variables panel follows the actual `handleRequest(command)` call into the worker file and the returned response back to the client.
boundary
The client owns the selected command, label, and visible output. The worker owns the response rule for that command.
Project Entry
RequestClient.kt
Replay: real traced execution (multi-file project)
fun main() {
val command = "status"
val label = if (command == "refresh") {
"cache"
} else if (command == "archive") {
"storage"
} else {
"health"
}
val response = handleRequest(command)
val ticket = 40 + command.length
println("label=$label")
println("ticket=$ticket")
println(response)
}
fun main() {
val command = "refresh"
val label = if (command == "refresh") {
"cache"
} else if (command == "archive") {
"storage"
} else {
"health"
}
val response = handleRequest(command)
val ticket = 40 + command.length
println("label=$label")
println("ticket=$ticket")
println(response)
}
fun main() {
val command = "archive"
val label = if (command == "refresh") {
"cache"
} else if (command == "archive") {
"storage"
} else {
"health"
}
val response = handleRequest(command)
val ticket = 40 + command.length
println("label=$label")
println("ticket=$ticket")
println(response)
}
command ← status, label ← health
1fun main() {2 val command→ status = "status" //@command="refresh", "archive"3 val label→ health = if (commandstatus == "refresh") {4 "cache"5 } else if (commandstatus == "archive") {6 "storage"7 } else {8 "health"9 }10 val response = handleRequest(commandstatus)11 val ticket = 40 + command.lengthaccess ← ok, response ← service ready
1fun main() {2 val command = "status" //@command="refresh", "archive"3 val label = if (command == "refresh") {4 "cache"5 } else if (command == "archive") {6 "storage"7 } else {8 "health"9 }10 val response = handleRequest(command)11 val ticket = 40 + command.length1213 println("label=$label")values this stepokaccessservice readyresponsestatuscommandresponse ← ok:service ready, ticket ← 46
9 }10 val response→ ok:service ready = handleRequest(commandstatus)11 val ticket→ 46 = 40 + command.length61213 println("label=$labelhealth")14 println("ticket=$ticket46")15 println(responseok:service ready)16}outputlabel=health ticket=46 ok:service ready