plugin: add support for closing plugins
Adding support for closing plugins would give a simple way to do hot code reloading in long running applications like web servers. This would add another method to `src/plugin/plugin.go` and a new file `src/plugin/dl_close.go` that would handle closing the dlhandle and destroying the go symbol map. It would also add the handle as an un-exported unsafe pointer to the go plugin struct. The main issue is how to signal that a plugin has been closed without breaking API compatibility. Currently the plugin has a channel called `loaded` which is closed when the plugin is loaded. The simplest solution is to add another channel which is closed when the plugin is closed, however this doesn't seem very 'neat' to me.
Posted by zacps on May 22, 2017, 10:54 PM
Tags
Related issues
- some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
- I think of this as the kiosk economy.
- What a goofy comment.
- There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
- Compose support in WSLc
- [RFC] Roadmap to v2.0
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
support (Other)
some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
I think of this as the kiosk economy.
What a goofy comment.
There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
Compose support in WSLc
[RFC] Roadmap to v2.0
[Feature]: Add TurboQuant Support for KV Cache Quantization
Support for AGENTS.md and .agents/skills/, the community has been asking since August 2025
plugin: add support for closing plugins
Adding support for closing plugins would give a simple way to do hot code reloading in long running applications like web servers. This would add another method to `src/plugin/plugin.go` and a new file `src/plugin/dl_close.go` that would handle closing the dlhandle and destroying the go symbol map. It would also add the handle as an un-exported unsafe pointer to the go plugin struct. The main issue is how to signal that a plugin has been closed without breaking API compatibility. Currently the plugin has a channel called `loaded` which is closed when the plugin is loaded. The simplest solution is to add another channel which is closed when the plugin is closed, however this doesn't seem very 'neat' to me.
Comments (0)
No comments yet. Start the discussion.