MCPcopy
hub / github.com/google/mtail / UnloadProgram

Method UnloadProgram

internal/runtime/runtime.go:351–358  ·  view source on GitHub ↗

UnloadProgram removes the named program, any currently running VM goroutine.

(pathname string)

Source from the content-addressed store, hash-verified

349
350// UnloadProgram removes the named program, any currently running VM goroutine.
351func (r *Runtime) UnloadProgram(pathname string) {
352 name := filepath.Base(pathname)
353 r.handleMu.Lock()
354 defer r.handleMu.Unlock()
355 close(r.handles[name].lines)
356 delete(r.handles, name)
357 ProgUnloads.Add(name, 1)
358}

Callers 1

LoadAllProgramsMethod · 0.95

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected