@@ -22,6 +22,9 @@ Value handle_request_for(std::string_view funcname, HttpMethod_t handler, std::v
2222 Server& srv = create_server ();
2323
2424 (srv.*handler)(n[0 ].string ().c_str (), [funcname, n, vm](const Request& req, Response& res) {
25+ // todo: find a way to have 1 execution context per thread. Should we use a lock?
26+ // Pre-create as many execution contexts as threads inside cpp-httplib pool?
27+ // Track contexts that are being used to find the first available one
2528 std::string content;
2629 std::string type;
2730 Value r;
@@ -34,7 +37,7 @@ Value handle_request_for(std::string_view funcname, HttpMethod_t handler, std::v
3437 matches.push_back (Value (req.matches [i]));
3538
3639 if (req.params .size () == 0 )
37- r = vm->resolve (&n[1 ], matches, req.body , Nil);
40+ r = Nil; // fixme: vm->resolve(&n[1], matches, req.body, Nil);
3841 else
3942 {
4043 // craft params
@@ -43,7 +46,7 @@ Value handle_request_for(std::string_view funcname, HttpMethod_t handler, std::v
4346
4447 Value params = Value (UserType (&p.back (), get_cfs_param ()));
4548
46- r = vm->resolve (&n[1 ], matches, req.body , params);
49+ r = Nil; // fixme: vm->resolve(&n[1], matches, req.body, params);
4750 }
4851 }
4952 // no matches, maybe params
@@ -55,11 +58,11 @@ Value handle_request_for(std::string_view funcname, HttpMethod_t handler, std::v
5558
5659 Value params = Value (UserType (&p.back (), get_cfs_param ()));
5760
58- r = vm->resolve (&n[1 ], Nil, req.body , params);
61+ r = Nil; // fixme: vm->resolve(&n[1], Nil, req.body, params);
5962 }
6063 // no matches, no params
6164 else
62- r = vm->resolve (&n[1 ], Nil, req.body , Nil);
65+ r = Nil; // fixme: vm->resolve(&n[1], Nil, req.body, Nil);
6366
6467 if (CHECK_FUNC_RETURN_VAL_FOR_REQ (r))
6568 {
0 commit comments