const std = @import("std"); threadlocal var route: []const u8 = "background"; pub fn bind(value: []const u8) void { route = value; } pub fn unbind() void { route = "background"; } pub fn currentRoute() []const u8 { return route; } test "request route context is scoped explicitly" { try std.testing.expectEqualStrings("background", currentRoute()); bind("repo_create_record"); try std.testing.expectEqualStrings("repo_create_record", currentRoute()); unbind(); try std.testing.expectEqualStrings("background", currentRoute()); }