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

Function getThreadLocalWasm

plugins/experimental/wasm/lib/src/wasm.cc:573–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571};
572
573std::shared_ptr<WasmHandleBase> getThreadLocalWasm(std::string_view vm_key) {
574 auto it = local_wasms.find(std::string(vm_key));
575 if (it != local_wasms.end()) {
576 auto wasm = it->second.lock();
577 if (wasm) {
578 return wasm;
579 }
580 local_wasms.erase(it);
581 }
582 removeStaleLocalCacheEntries(local_wasms, local_wasms_keys);
583 return nullptr;
584}
585
586static std::shared_ptr<WasmHandleBase>
587getOrCreateThreadLocalWasm(const std::shared_ptr<WasmHandleBase> &base_handle,

Callers 1

enqueueMethod · 0.85

Calls 6

stringClass · 0.85
findMethod · 0.45
endMethod · 0.45
lockMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected