MCPcopy Create free account
hub / github.com/apache/trafficserver / ts_lua_destroy_vm

Function ts_lua_destroy_vm

plugins/lua/ts_lua_util.cc:135–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void
136ts_lua_destroy_vm(ts_lua_main_ctx *arr, int n)
137{
138 int i;
139 lua_State *L;
140 TSMutex mutexp;
141 ts_lua_ctx_stats *stats;
142
143 for (i = 0; i < n; i++) {
144 L = arr[i].lua;
145 if (L) {
146 lua_close(L);
147 arr[i].lua = nullptr;
148 }
149 mutexp = arr[i].mutexp;
150 if (mutexp) {
151 TSMutexDestroy(mutexp);
152 arr[i].mutexp = nullptr;
153 }
154
155 stats = arr[i].stats;
156 if (stats) {
157 ts_lua_destroy_ctx_stats(stats);
158 arr[i].stats = nullptr;
159 }
160 }
161
162 return;
163}
164
165lua_State *
166ts_lua_new_state()

Callers 1

create_lua_vmsFunction · 0.85

Calls 2

TSMutexDestroyFunction · 0.85
ts_lua_destroy_ctx_statsFunction · 0.85

Tested by

no test coverage detected