Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit fb0ca31

Browse files
tikikunhiento09
authored andcommitted
add destroy
1 parent 9db2a5e commit fb0ca31

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "processManager.h"
2+
#include <cstdlib>
3+
#include <trantor/utils/Logger.h>
4+
5+
void processManager::destroy(
6+
const HttpRequestPtr &req,
7+
std::function<void(const HttpResponsePtr &)> &&callback) {
8+
LOG_INFO << "Program is exitting, goodbye!";
9+
exit(0);
10+
return;
11+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#pragma once
2+
3+
#include <drogon/HttpController.h>
4+
#include <drogon/HttpTypes.h>
5+
6+
using namespace drogon;
7+
8+
class processManager : public drogon::HttpController<processManager> {
9+
public:
10+
METHOD_LIST_BEGIN
11+
12+
METHOD_ADD(processManager::destroy, "/destroy",
13+
Delete); // path is /processManager/{arg1}/{arg2}/list
14+
15+
METHOD_LIST_END
16+
17+
void destroy(const HttpRequestPtr &req,
18+
std::function<void(const HttpResponsePtr &)> &&callback);
19+
};

cpp/tensorrt_llm/nitro/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int main(int argc, char* argv[])
4949
}
5050

5151
int logical_cores = std::thread::hardware_concurrency();
52-
int drogon_thread_num = 1; // temporarily set thread num to 1
52+
int drogon_thread_num = std::thread::hardware_concurrency(); // temporarily set thread num to 1
5353
nitro_utils::nitro_logo();
5454
#ifdef NITRO_VERSION
5555
LOG_INFO << "Nitro version: " << NITRO_VERSION;

0 commit comments

Comments
 (0)