mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
src: close tracing event loop
Clean up resources when tearing down the tracing agent. PR-URL: https://github.com/nodejs/node/pull/21867 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
This commit is contained in:
1 parent
4c9c1bbc45
commit
56edd5fc5b
2 files changed
+7
No files matched your search
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <string>
|
||||
#include "tracing/node_trace_buffer.h"
|
||||
#include "debug_utils.h"
|
||||
#include "env-inl.h"
|
||||
|
||||
namespace node {
|
||||
namespace tracing {
|
||||
@@ -53,6 +55,10 @@ Agent::Agent() {
|
||||
CHECK_EQ(uv_loop_init(&tracing_loop_), 0);
|
||||
}
|
||||
|
||||
Agent::~Agent() {
|
||||
CheckedUvLoopClose(&tracing_loop_);
|
||||
}
|
||||
|
||||
void Agent::Start() {
|
||||
if (started_)
|
||||
return;
|
||||
|
||||
@@ -64,6 +64,7 @@ class AgentWriterHandle {
|
||||
class Agent {
|
||||
public:
|
||||
Agent();
|
||||
~Agent();
|
||||
|
||||
TracingController* GetTracingController() { return tracing_controller_; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user