Concurrency and Source Panels
Client and Worker Files
Replay one C++ execution that builds a request in the client file, calls a worker helper in another translation unit, and returns response data.
Project Entry
request_client.cpp
#include <iostream>
#include <string>
#include <utility>
std::pair<std::string, std::string> handleRequest(const std::string& command);
int main() {
std::string command = ;
std::string user = "reader";
auto response = handleRequest(command);
std::cout << "send=" << command << std::endl;
std::cout << "route=" << response.first << std::endl;
std::cout << "body=" << response.second << std::endl;
std::cout << "user=" << user << std::endl;
return 0;
}
#include <iostream>
#include <string>
#include <utility>
std::pair<std::string, std::string> handleRequest(const std::string& command);
int main() {
std::string command = ;
std::string user = "reader";
auto response = handleRequest(command);
std::cout << "send=" << command << std::endl;
std::cout << "route=" << response.first << std::endl;
std::cout << "body=" << response.second << std::endl;
std::cout << "user=" << user << std::endl;
return 0;
}
#include <iostream>
#include <string>
#include <utility>
std::pair<std::string, std::string> handleRequest(const std::string& command);
int main() {
std::string command = ;
std::string user = "reader";
auto response = handleRequest(command);
std::cout << "send=" << command << std::endl;
std::cout << "route=" << response.first << std::endl;
std::cout << "body=" << response.second << std::endl;
std::cout << "user=" << user << std::endl;
return 0;
}
panels
Each source file has its own panel because both files participate in the same execution trace. The Variables panel follows the call from the client file into the worker file and then back to the caller.
boundary
The client file owns the entry point and visible output. The worker file owns the routing rule that turns each command into a route and response body.