PluginLoaded reports whether a plugin dynamic library is still loaded by the host.
(id string)
| 142 | |
| 143 | // PluginLoaded reports whether a plugin dynamic library is still loaded by the host. |
| 144 | func (h *Host) PluginLoaded(id string) bool { |
| 145 | if h == nil { |
| 146 | return false |
| 147 | } |
| 148 | id = strings.TrimSpace(id) |
| 149 | if id == "" { |
| 150 | return false |
| 151 | } |
| 152 | h.mu.Lock() |
| 153 | defer h.mu.Unlock() |
| 154 | _, ok := h.loaded[id] |
| 155 | if ok { |
| 156 | return true |
| 157 | } |
| 158 | return len(h.retired[id]) > 0 |
| 159 | } |
| 160 | |
| 161 | // PluginBusy reports whether a plugin dynamic library is loaded or being loaded. |
| 162 | func (h *Host) PluginBusy(id string) bool { |
no outgoing calls